Have a head for (something)

To have the mental capacity for something.

My father has a head for numbers and is very good at mathematics.