Matrix $A^T A$ as sum of outer products
Solution 1:
Hint:
$$A = \left[\begin{array}{ll} a_1\\0\\ 0\\ \vdots\\0 \end{array}\right] + \left[\begin{array}{ll} 0\\a_2\\ 0\\ \vdots\\0 \end{array}\right] + \dots + \left[\begin{array}{ll} 0\\0\\ 0\\ \vdots\\a_n \end{array}\right] $$
$$ A^TA = A^T\left[\begin{array}{ll} a_1\\0\\ 0\\ \vdots\\0 \end{array}\right] + A^T\left[\begin{array}{ll} 0\\a_2\\ 0\\ \vdots\\0 \end{array}\right] + \dots + A^T\left[\begin{array}{ll} 0\\0\\ 0\\ \vdots\\a_n \end{array}\right] $$