## Shortest distance - Perpendicularity

How can do we show that the shortest distance between two sets is always the vector that is perpendicular to both sets?

I remembered it went through inner products, but it's not working for me.

where g,f are column vectors of $\mathbb{R}^n$ with n being finite.
<g-f,g-f>= <g,g>-2*||g||*||f|*cos( $\alpha$|)+<f,f>