The first three follow by summing diagonal entries. The last is cyclic invariance; it applies to any number of factors, not only four. A teaching derivation of the basic step is
tr(AB)=i,j∑AijBji=j,i∑BjiAij=tr(BA).
This also works for rectangular A∈Rm×n and B∈Rn×m because both products are square, though their sizes differ. Group a longer product into two factors to move its first factor to the end.
A cycle is not a shuffle
Let A=[1000], B=[0010], and C=[0100]. Then BC=A, so tr(ABC)=1. But BA=0, so tr(BAC)=0. Arbitrary swaps fail. Taking a fourth factor D=I gives the source’s four-factor warning.
The trace also equals the sum of eigenvalues, counted with algebraic multiplicity:
tr(A)=i∑λi(A).
The source states this identity without proof. A general real matrix can have complex eigenvalues; the sum still equals its real trace. For symmetric matrices all eigenvalues are real, as the spectral theorem will establish.
Transfer
Must tr(ABC) equal tr(CAB)? Must it equal tr(ACB)?
Preserve the cyclic order
The first equality holds whenever the cyclic products are defined and square. The second need not hold: it swaps two factors instead of cycling them.