Trace of matrix which equals to number of columns

176 Views Asked by At

While studying linear algebra, I found that:

Let $A$ be an $m \times n$ Matrix (with $m>n$) then the trace $tr(A(A^T A)^{-1} A^T)$ equals the number of columns of $A$.

Does this hold in general and if so: why?

If the number of columns is 1, the trace seems to be 1, too.

I think that each columns acts like some kind of adding 1, but I can't explain why.

1

There are 1 best solutions below

1
On BEST ANSWER

You might already know that $tr(CD) = tr(DC)$ (if not try proving it with the definition of the trace). Now take $C := A$ and $D := (A^T A)^{-1} A^T$ and apply said rule. Now think about what $(A^T A)^{-1}$ is (supposing that $(A^T A)$ is invertible).

Solution:

$tr(A(A^T A)^{-1} A^T) = tr((A^T A)^{-1} A^T A) = tr(Id_n) = n = \text{Number of columns}$