Resolution of the identity in an orthonormal basis (source code)

= Resolution of the identity in an orthonormal basis
{title2=$I=\sum_{j=1}^nu_ju_j^T$}

For a real <orthonormal basis> $u_1,\ldots,u_n$, each <vector> has expansion $x=\sum_j u_j(u_j^Tx)$. Since this holds for every $x$, the sum of the rank-one <orthogonal projection matrices> $u_ju_j^T$ is the <identity matrix>. Their pairwise products vanish for distinct basis vectors. For a complex <inner product space>, replace the <transpose> by the <conjugate transpose>.