Determine the sum of the entries in the main diagonal of the matrix $A · A^T$

134 Views Asked by At

All the entries of the matrix A are $0$, $1$ or $-1$, and it has exactly $2012$ nonzero entries. Determine the sum of the entries in the main diagonal of the matrix $A · A^T$

I can only figure out that $A · A^T$ is symmetric matrix but I don't know how I can use this property?

UPDATE: I have not satisfied with given answers.The question is still active there is no accepted answer.

3

There are 3 best solutions below

3
On

Hint: the sum of all diagonal entries of $AA^T$ is equal to $\sum_i\sum_j(A)_{ij}(A^T)_{ji}=\sum_i\sum_jA_{ij}^2$ (we usually write this as $\operatorname{tr}(AA^T)=\|A\|_F^2$, where $\|\cdot\|_F$ denotes Frobenius norm). Since $A_{ij}\in\{0,1,-1\}$, $A_{ij}^2$ is either $0$ or $1$.

0
On

Suppose that $A=[a_{ij}]\in\mathbb{R}^{m\times n} $. Then, $A^T=[b_{ij}]\in\mathbb{R}^{n\times m}$ with $a_{ij}=b_{ji}$ for each $i,j$. We have that $A\cdot A^T\in\mathbb{R}^{m\times m}$, and therefore $$tr(A\cdot A^T)=\sum_{i=1}^m \:c_{ii}$$ where $A\cdot A^T=[c_{ij}]$. The matrix multiplication formula yields $$c_{ij}=\sum_{k=1}^n \:a_{ik}\cdot b_{kj}=\sum_{k=1}^n \:a_{ik}\cdot a_{jk}$$ Putting $i=j$ and summing over $i$ gives $$tr(A\cdot A^T)=\sum_{i=1}^m \:c_{ii}=\sum_{i=1}^m \sum_{k=1}^n\: a_{ik}^2=\sum_{i,j} a_{ij}^2$$

Since $a_{ij}\in\{-1,0,1\}$ and $A$ has $2012$ non-zero entries by hypothesis, we have $$\boxed{tr(A\cdot A^T)=2012}$$

1
On

If $a_k$ is the $k-$th row of $A$, then $$ (AA^T)_{kk}=a_k\cdot a_k=\|a_k\|^2=\text{number of non-zero elements} $$ But $$ \|a_k\|^2=\text{number of non-zero elements of $a_k$} $$ Hence $$ \mathrm{Tr}\,(AA^T)=\sum_{k=1}^n (AA^T)_{kk}=\sum_{k=1}^n \|a_k\|^2=\text{number of nonzero elements of $A$}=2012 $$