Ordinary least squares give $P = A{\left( {{A^{\text{T}}}A} \right)^{ - 1}}{A^{\text{T}}}$, prove ${P^2} = P$ and ${P^{\text{T}}} = P$

33 Views Asked by At

Ordinary least squares give a solution matrix $P = A{\left( {{A^{\text{T}}}A} \right)^{ - 1}}{A^{\text{T}}}$

Multiplying with $P$ is projecting the vectors orthogonal to $A \in {\mathbb{R}^{m \times n}}$ subspace.

Now, I need to prove ${P^2} = P$ and ${P^{\text{T}}} = P$. I don't know where to even start, and after some research I'm not familiar with matrix image and kernel concepts.

1

There are 1 best solutions below

2
On BEST ANSWER

For the first part, note that: $$\begin{gathered} P = A{\left( {{A^{\text{T}}}A} \right)^{ - 1}}{A^{\text{T}}} \to \hfill \\ {P^2} = PP = A{\left( {{A^{\text{T}}}A} \right)^{ - 1}}{A^{\text{T}}}A{\left( {{A^{\text{T}}}A} \right)^{ - 1}}{A^{\text{T}}} \hfill \\ \xrightarrow{{M = {A^{\text{T}}}A}}{P^2} = A{M^{ - 1}}M{M^{ - 1}}{A^{\text{T}}} = A{M^{ - 1}}{A^{\text{T}}} \hfill \\ \to {P^2} = A{\left( {{A^{\text{T}}}A} \right)^{ - 1}}{A^{\text{T}}} \to {P^2} = P \hfill \\ \end{gathered}$$ and for the second part: $$\begin{gathered} {P^{\text{T}}} = {\left( {A{{\left( {{A^{\text{T}}}A} \right)}^{ - 1}}{A^{\text{T}}}} \right)^{\text{T}}} = {\left( {A{M^{ - 1}}{A^{\text{T}}}} \right)^{\text{T}}} \hfill \\ \left. \begin{gathered} \to {P^{\text{T}}} = A{\left( {{M^{\text{T}}}} \right)^{ - 1}}{A^{\text{T}}} \hfill \\ {M^{\text{T}}} = {\left( {{A^{\text{T}}}A} \right)^{\text{T}}} = {A^{\text{T}}}A = M \hfill \\ \end{gathered} \right\} \to {P^{\text{T}}} = A{M^{ - 1}}{A^{\text{T}}} = P \hfill \\ \end{gathered}$$ P.S. Note that: $${\left( {AB} \right)^{\text{T}}} = {B^{\text{T}}}{A^{\text{T}}}$$ and also: $${\left( {{A^{\text{T}}}} \right)^{\text{T}}} = A$$