Why multiply a matrix with its transpose?

Solution 1:

There are great answers by fellow members. I would like to visualize just this particular problem. Lets say there are $4$ companies $A$,$B$,$C$ and $D$ and all of them sell three fruits Apples, Oranges and Pears. Because the numbers are less, I will assume that we want to see the daily sales in numbers of all companies.

Create the table for daily sales: $$\begin{bmatrix} &\text {Apples} & \text{Oranges}&\text{Pears} \\\text{Company 1}&10&2&5\\\text{Company 2} &5&3&10\\\text{Company 3} &4&3&2\\\text{Company 4} &5&10&5\\\end{bmatrix}$$

Just ignore the words and look at the numbers. The first row and first column are just for understanding. The numerical values of the table represent your matrix $A$. This table tells you the daily sales of each company for apples, oranges and pears.

$$A=\begin{bmatrix}10 & 2&5 \\5 & 3&10 \\4 & 3&2\\5 & 10&5 \end{bmatrix}$$ If we just write the table in another way, to see just the sales of a particular fruit from all the companies we will write, $$\begin{bmatrix} &\text {Company 1} & \text{Company 2}&\text{Company 3}&\text{Company 4} \\\text{Apples}&10&5&4&5\\\text{Oranges} &2&3&3&10\\\text{Pears} &5&10&2&5\\\end{bmatrix}$$ This can be written as: $$A^T=\begin{bmatrix}10 & 5&4&5 \\2 &3& 3&10 \\5 & 10&2&5\\ \end{bmatrix}$$ Now we keep both the tables together, $$\begin{bmatrix} &\text {Apples} & \text{Oranges}&\text{Pears} \\\text{Company 1}&10&2&5\\\text{Company 2} &5&3&10\\\text{Company 3} &4&3&2\\\text{Company 4} &5&10&5\\\end{bmatrix}\begin{bmatrix} &\text {Company 1} & \text{Company 2}&\text{Company 3}&\text{Company 4} \\\text{Apples}&10&5&4&5\\\text{Oranges} &2&3&3&10\\\text{Pears} &5&10&2&5\\\end{bmatrix}$$ If by some case there is a partnership between two companies say Company A and Company B, then what will be the total fruit sales? $$\text{Total fruit sales for the partnership} = \text{No of total apples + No of total oranges + No of total pears}$$

Total fruit sales for the partnership = Company 1 Apples X Company 2 Apples + Company 1 Oranges X Company 2 Oranges + Company 1 Pears X Company 2 Pears $$\text{Total fruit sales for the partnership} = 10X5 + 2X3 + 5X10=106$$ So the total sales of fruits for the partnership of Company A and Company B is $106$. This is nothing but the second element of the product $AA^T$.

$$AA^T=\begin{bmatrix}10 & 2&5 \\5 & 3&10 \\4 & 3&2\\5 & 10&5 \end{bmatrix}\begin{bmatrix}10 & 5&4&5 \\2 &3& 3&10 \\5 & 10&2&5\\ \end{bmatrix}=\begin{bmatrix}129&106&56&85 \\106&134&49&105 \\56&49&29&60\\ 85&105&60&150\end{bmatrix}$$

What does this product show? This product can be visualized as the total sales chart of each company as well as the total sales of mutual parnterships of companies. $$\begin{bmatrix} &\text {Company 1} & \text{Company 2}&\text{Company 3}&\text{Company 4} \\\text{Company 1}&129&106&56&85\\\text{Company 2} &106&134&49&105\\\text{Company 3} &56&49&29&60\\\text{Company 4} &85&105&60&150\\\end{bmatrix}$$

Crucial points to observe:

  1. The diagonal elements of the matrix $AA^T$ are all just the squared sum of individual companies. For example the first element is the strength of sales of Company 1 and so on.

  2. Each non diagonal element shows the total sales that would result due to the partnership between two companies. For example the second element of $AA^T$ is the total sales produced due to the partnership between Company 1 and Company 2.

  3. The matrix $AA^T$ is symmetric, which can be visualized using the fact that the total sales due to the partnership of Company 1 and Company 2 is same as that of Company 2 and Company 1.

  4. Useful insight from $AA^T$is that check the diagonal elements , whichever is the maximum, you can confirm that Company is stronger in sales. Another useful insight is you can check whether partnership with a particular company is beneficial or not. For example, Company 3 is having the lowest sales individually, so it is beneficial for Company 3 to form a partnership with Company 4 because the total sales would be 60 which is more than double of what Company 3 can have. So, we can check which partnerships would be most beneficial.

  5. Diagonal elements: (A measure of) Individual strengths, Non Diagonal Elements: Partnership strengths.

Hope this helps...

Solution 2:

In your case, $AA^T$ just sitting on a park bench doesn't tell you anything of great interest.

Hyprfrcb's answer talks about units. One of the elements has units of squared apples. Another has units of pear-oranges. Another has units of orange-pears! This by itself should be a red flag that values don't mean anything by themselves.

It can be a means to get to a least-squares solution if you were looking to model, say, how much of each fruit you'd expect to sell on a particular day. (This was one of the answers in the linked question.)

But by itself? It's just a fruit hybridization experiment gone terribly wrong.

Solution 3:

Lets consider the matrix $A$ characterizing the values of some variables $a_{ij}$, $j=1...m$ with values at different times $i=1...n$, as in the OP example, but transposed.

If the variables are normalized in mean, the matrix $\frac 1m A^TA$ is the estimator of the covariances $s_{j_1j_2}=\mathbb{E}(a_{\cdot j_1}a_{\cdot j_2}) \approx \frac 1m \sum a_{j_1}a_{j_2}$ for the set of random variables $a_{\cdot j=1...m}$.

If the entries $a_{ij}$ of $A$ have units of $[a]$, then the entries of $AA^T$ will have units of $[a^2]$. This is consistent with the abovementioned.

When solving the problem $Ax=B$, the solution $x=(A^TA)^{-1}A^TB$ is the best estimator (LS), provided that the covariance as defined above, is enough variable to be invertible.