# When can we write the square of a matrix as the product of the matrix and its transpose?

I often see something like $(A - B)^2$ being written as $(A - B)(A - B)^T$ . Here $A$ and $B$ are two matrices. I can see that this is possible when $A$ and $B$ are scalars (i.e) single element matrices. In what other cases does this equality hold ?

-
Say $A-B$ is symmetric. And maybe your observation contains misunderstanding. $(A-B)^2$ and $(A-B)(A-B)^T$ has totally different meanings. It's not about writing style. – Shuchang Mar 1 '14 at 2:59
Makes Sense. Thanks Shuchang. Yes, I understand that it has nothing to do with writing style. I just wanted to know when we could jump between the two. I see this being done a lot in textbooks having derivations. – Bob Mar 1 '14 at 3:04
It's very rarely correct to say $(A-B)^2=(A-B)(A-B)^T$. Essentially, it is only true if $A-B$ is symmetric. Saying you "often" see something makes it very hard to figure out whether the argument is wrong, or the context allows this due to symmetry - please be specific with examples. – Thomas Andrews Mar 1 '14 at 3:13
There is a case like this, where $A,B$ are row vectors, then $$\left|A-B\right|^2 = (A-B)(A-B)^T$$ – Thomas Andrews Mar 1 '14 at 3:15
@Bob It might not be. But you are referring to derivatives. It's highly possible the textbooks read $||A-B||^2$, in which case they are equivalent. – Shuchang Mar 1 '14 at 3:33

It seems to me there are two related questions operative here; the first is the question as posed in the title, which I take to apply to any square matrix $C$: when can we write $C^2 = CC^T$? that is, what special properties must $C$ possess which would imply, or be implied by, $C^2 = CC^T$? The second question, which is really only a minor variation of the first, asks what happens when $C$ is represented in the special form $C = A - B$, so that we have $(A - B)(A - B) = (A - B)(A^T - B^T)$. But the equivalence of these two views is easily seen: since $A$ and $B$ are arbitrary, any $C$ may be written in the form $A - B$ by simply taking $A = C$, $B = 0$; furthermore, by fixing $C$ and taking $A = B + C$, and letting $B$ range over the set of all $B$ square matrices, we see that all pairs of matrices $A$, $B$ with $C = A - B$ may be so obtained. And since nothing further has been specified concerning $A$ and $B$, e.g. there is no special relationship between them which might give $C = A - B$ some additional structure, we might as well enjoy the at least the notational convenience of working with $C$. Results can always be translated back to the $A - B$ form if so desired.

So when does $C^2 = CC^T$ hold? Well, as we used to say out west at old Caltech, it is "trivially obvious to even the most casual observer" that $C$ symmetric, that is, $C =C^T$, implies $C^2 = CC^T$. But wait! There's more! Suppose we write the equation $C^2 = CC^T$ in the form

$C(C - C^T) = 0; \tag{1}$

from (1) we see that in the event that $C$ is invertible, i.e. $\exists C^{-1}$, then upon left multiplication by $C^{-1}$ we obtain

$C - C^T = 0 \Rightarrow C = C^T \tag{2}$

i.e. $C$ must be symmetric in this case. If, the other hand, we assume $C - C^T$ is invertible, we immediately run into trouble: if $\exists (C - C^T)^{-1}$, then right multiplication of (1) by $(C - C^T)^{-1}$ yields

$C = 0; \tag{3}$

but (3) forces

$C - C^T = 0 - 0 = 0, \tag{4}$

and this contradiction shows that $C - C^T$ cannot have an inverse if

$C^2 = CC^T. \tag{5}$

Closer scrutiny of the matrix $C - C^T$, the right-hand factor in (1), reveals that it is in fact skew-symmetric, that is

$(C - C^T)^T = C^T - (C^T)^T = C^T - C = -(C - C^T); \tag{6}$

indeed, $C$, as may any other matrix, be decomposed into unique symmetric and skew-symmetric parts, $C_+ = C_+^T$ and $C_-= -C_-^T$:

$C = C_+ + C_-, \tag{7}$

and if we take the transpose of (7) we see that

$C^T = C_+^T + C_-^T = C_+ - C_-; \tag{8}$

(7) and (8) may be solved for $C_+$ and $C_-$ by adding and subtracting them, yielding

$C_+ = \dfrac{1}{2}(C + C^T); \; C_- = \dfrac{1}{2}(C - C^T), \tag{9}$

and if the equations (9) are inserted into (1) we see that

$2(C_+ + C_-)C_- = 0 \Leftrightarrow (C_+ + C_-)C_- = 0; \tag{10}$

from (10) we have

$(C_+ + C_-)C_- = C_+C_- + C_-^2 = 0, \tag{11}$

or

$C_+C_- = -C_-^2. \tag{12}$

We next observe that, though $C_-$ is skew-symmetric, $C_-^2$ is in fact symmetric:

$(C_-^2)^T = (C_-C_-)^T = C_-^TC_-^T = (-C_-)(-C_-) = C_-^2, \tag{13}$

and so $-C_-^2$ is also symmetric; by transposing (12) we see that

$-C_-C_+ = C_-^TC_+^T = (C_+C_-)^T = (-C_-^2)^T = -C_-^2 = C_+C_-. \tag{14}$

(12)-(14) show that, for (5) to hold, the symmetric and skew-symmetric parts of $C$ must satisfy

$C_+C_- = -C_-^2 = -C_-C_+. \tag{15}$

Having sifted through various implications of (5) we have finally found one, (12), which is both necessary and sufficient. The necessity of (12), given (5), has just been shown. That (5) follows from (12) is also easy to see; just take a walk backwards from (12) to (5); the essential steps are all logically bidirectional.

(15) in fact shows that $C_+$ and $C_-$ must in fact anticommute, i.e.

$C_+C_- + C_-C_+ = 0; \tag{16}$

we also see that $C_+C_- + C_-C_+$ is skew-symmetric, whether it happens to vanish or not:

$(C_+C_- + C_-C_+)^T = -C_-C_+ - C_+C_- = -(C_+C_- + C_-C_+); \tag{17}$

it is in fact in general the skew-symmetric part of $C^2$, as may be seen from

$C^2 = (C_+ + C_-)^2 = (C_+^2 + C_-^2) + (C_+C_- + C_-C_+); \tag{18}$

Note that $C_+^2 + C_-^2$ is symmetric, as we have seen; just as we have seen that $C_+C_- + C_-C_+$ is skew; the decomposition into symmetric and skew-symmetric parts being unique, the formula (18) expresses the only such decomposition of $C^2$; in the specific case at hand, $C^2 = CC^T$, we see that this reduces to

$C^2 = (C_+ + C_-)^2 = C_+^2 + C_-^2 \tag{19}$

by virtue of (16).

Well, this shows the kinds of structural properties $C$ must have for $C^2 = CC^T$ to apply. I think that by digging further along these veins more could be unearthed, but that's as far as I'm taking it for the moment.

Hope this helps. Cheerio,

and as always,

Fiat Lux!!!

-

In the answer of Robert, his condition (12) $C_+C_-=-{C_-}^2$ is exactly the same as the hypothesis $C^2=CC^T$. More seriously, we prove the following:

Proposition: Let $C\in\mathcal{M}_n(\mathbb{R})$ s.t. $CC^T=C^2$. Then $C$ is symmetric.

Proof: $C^2$ is a symmetric real matrix s.t. $C^2\geq 0$. We may assume $C^2=diag(0_k,U)$ where $U>0$. $C$ and $C^2$ commute ; then $C=diag(V,W)$ where $V,W$ are real matrix s.t. $VV^T=V^2=0_k$ and $WW^T=W^2=U$. Clearly $W$ is invertible and consequently symmetric. Now $VV^T=0_k$ implies that the singular values of $V$ are zero. Thus $V=0_k$ and we are done.

Remark: The problem is more difficult over $\mathcal{M}_n(\mathbb{C})$ except if we replace $C^T$ with $C^*$.

-