Showing the closest point in a set to a point outside the set is orthogonal to

Hi everyone,

I have a bit of an algebra/convexity type problem. I've been asked to show that if V is a linear subspace in R^n and y is not in V, then show that x* in V is the closest point in V to y if and only if y-x* is orthogonal to V. I'm a bit stuck on this. I know any subspace must be a hyperplane, so intuitively, this makes sense, but I'm having trouble bridging the gap to make it rigorous. Any ideas?

Thanks for any help!

Best,

Alex