# Orthogonality of vectors that minimize a function on affine spaces

Problem: Let $f:\mathbb{R}^n \rightarrow \mathbb{R}$ be defined by $f(x) = x \cdot M x$, where $M$ is a positive definite symmetric matrix. Let $A_1, A_2$ be two distinct affine subspaces of $\mathbb{R}^n$, $y \in A_1 \cap A_2$, and $x_1, x_2$ minimize $f$ over $A_1, A_2$ respectively. Prove that $y \cdot M(x_1 - x_2) = 0$.

Attempt: We know that since $x_1,x_2$ minimize $f$ over $A_1,A_2$ respectively, $\nabla f(x_1) \cdot (y - x_1) = 0$, and $\nabla f(x_2) \cdot (y - x_2) = 0$ by necessary condition of minimizer on arbitrary sets of $\mathbb{R}^n$. This in turn means $y \cdot Mx_1 = x_1 \cdot M x_1$, and $y \cdot Mx_2 = x_2 \cdot M x_2$. These are nice results and seem useful, but I cannot see how $y \cdot M (x_1 - x_2) = min_{A_1}f - min_{A_2}f$ could lead to the desired result. Any help is appreciated!

• What are A and B? – Michael Mar 19 '18 at 1:44
• Sorry they are typos, I meant $A_1$ and $A_2$. – Longti Mar 19 '18 at 1:45

As your work suggests, the statement you wish to prove is not true. As a counterexample, let's consider a simple case in $\mathbb R^2$ where the minima are not equal:

$$M=I_2$$

$$A_1=\{\langle x,y\rangle\in\mathbb R^2: x=1\}$$

$$A_2=\{\langle x,y\rangle\in\mathbb R^2: y=2\}$$

Doing the computations yields a violation of the equality.

$$\vec y=\langle 1,2\rangle\in A_1\cap A_2$$

$$\vec x_1=\langle1, 0\rangle,\ \ \vec x_2=\langle0, 2\rangle$$

$$\vec y\cdot M(\vec x_1-\vec x_2)=\langle 1, 2\rangle\cdot\langle1, -2\rangle\neq0$$