Trace-adapted orthonormal basis of two-by-two matrices (source code)

= Trace-adapted orthonormal basis of two-by-two matrices
{title2=$I/\sqrt2,\quad\operatorname{diag}(1,-1)/\sqrt2,\quad(E_{12}+E_{21})/\sqrt2,\quad(E_{12}-E_{21})/\sqrt2$}

For the real two-by-two <matrix> space, the <Frobenius inner product> is $\operatorname{tr}(A^tB)=\sum_{i,j}a_{ij}b_{ij}$. The displayed four matrices form an <orthonormal basis>. The first spans the identity direction, the next two span the traceless <symmetric> matrices, and the last spans the antisymmetric matrices. <Symmetric> and antisymmetric matrices are <orthogonal> because transposition changes the sign of their <trace> pairing; pairing with the identity gives the <trace>. This <basis> therefore displays the <orthogonal direct sum> into these three natural pieces.