TITLE: Minimum of the given expression
QUESTION [6 upvotes]: For all real numbers $a$ and $b$ find the minimum of the following expression.
  $$(a-b)^2 + (2-a-b)^2 + (2a-3b)^2$$

I tried expressing the entire expression in terms of a single function of $a$ and $b$. For example, if the entire expression reduces to $(a-2b)^2+(a-2b)+5$ then its minimum can be easily found. But nothing seems to get this expression in such a form, because of the third unsymmetric square.
Since there are two variables here we can also not use differentiation. 
Can you please provide hints on how to solve this?

REPLY [3 votes]: $$(a-b)^2 + (2-a-b)^2 + (2a-3b)^2 = \left\| \,\, \begin{bmatrix} 1 & -1\\ 1 & 1\\ 2 & -3\end{bmatrix} \begin{bmatrix} a\\ b\end{bmatrix} - \begin{bmatrix} 0\\ 2\\ 0\end{bmatrix} \,\, \right\|_2^2$$
This is a least-squares problem. Since the matrix has full column rank, the minimum is
$$\left\| \,\, \begin{bmatrix} 1 & -1\\ 1 & 1\\ 2 & -3\end{bmatrix} \left( \begin{bmatrix} 1 & -1\\ 1 & 1\\ 2 & -3\end{bmatrix}^\top \begin{bmatrix} 1 & -1\\ 1 & 1\\ 2 & -3\end{bmatrix} \right)^{-1} \begin{bmatrix} 1 & -1\\ 1 & 1\\ 2 & -3\end{bmatrix}^\top \begin{bmatrix} 0\\ 2\\ 0\end{bmatrix} - \begin{bmatrix} 0\\ 2\\ 0\end{bmatrix} \,\, \right\|_2^2 = \color{blue}{\frac{2}{15}}$$

SymPy code
>>> from sympy import *
>>> A = Matrix([[ 1,-1],
                [ 1, 1],
                [ 2,-3]])
>>> b = Matrix([0,2,0])
>>> error = A * (A.T * A)**-1 * A.T * b - b

The squared Euclidean norm of the error vector is
>>> error.T * error
Matrix([[2/15]])