Tutorials › Multivariate Statistics (Graduate) › Kronecker Coordinates for Symmetric Matrix Transformations

Matrix Foundations for Inference · Tutorial 22 of 975

Kronecker Coordinates for Symmetric Matrix Transformations

Learn to build and use the coordinate map for transforming a symmetric matrix, and see how its coefficients arise from duplication and commutation matrices.

Beginner 9 min read

What You'll Learn

  • Define the lower-triangular coordinate order used by \(\operatorname{vech}\)
  • Relate \(\operatorname{vec}\), \(\operatorname{vech}\), and duplication and elimination matrices
  • Derive the coordinate map for a symmetric matrix transformation
  • Use commutation matrices to verify that the transformed matrix is symmetric
  • Calculate and check the map for square and rectangular examples

Why Use Coordinates for a Symmetric Transformation?

A symmetric matrix contains repeated entries: its upper-triangular entries mirror its lower-triangular ones. When a matrix \(S\) is transformed to \(ASA^T\), it is often useful to work only with the distinct entries, rather than carry both copies through every calculation. The coordinate map developed here converts the distinct coordinates of \(S\) directly into those of \(ASA^T\).

The construction combines two familiar operations: \(\operatorname{vec}\), which stacks all columns of a matrix, and \(\operatorname{vech}\), which stacks just the lower-triangular entries, column by column. Duplication matrices expand symmetric coordinates into a full vector, while elimination matrices extract the lower-triangular coordinates. Commutation matrices make the symmetry in the transformation explicit.

Coordinates and the Matrices That Connect Them

Definition: For an \(n\times n\) matrix \(S\), \(\operatorname{vec}(S)\) stacks the columns of \(S\). If \(S\) is symmetric, \(\operatorname{vech}(S)\) stacks its lower-triangular entries, column by column, including the diagonal. Thus, for a \(3\times3\) symmetric matrix, \(\operatorname{vech}(S)=(s_{11},s_{21},s_{31},s_{22},s_{32},s_{33})^T\).

There are \(n(n+1)/2\) distinct entries in an \(n\times n\) symmetric matrix. The duplication matrix \(D_n\), of size \(n^2\times n(n+1)/2\), puts each of these coordinates into the appropriate positions of a full vector, duplicating off-diagonal entries. The elimination matrix \(L_n\), of size \(n(n+1)/2\times n^2\), extracts the lower-triangular entries from a column-stacked matrix.

Definition: The duplication and elimination matrices are specified by $$ \operatorname{vec}(S)=D_n\operatorname{vech}(S)\quad\text{for symmetric }S, \qquad \operatorname{vech}(B)=L_n\operatorname{vec}(B)\quad\text{for any }n\times n\text{ matrix }B. $$ In particular, \(L_nD_n=I_{n(n+1)/2}\): extracting the coordinates after duplicating them returns the original coordinates.

For an \(r\times s\) matrix \(X\), the commutation matrix \(K_{r,s}\) is the permutation matrix defined by \(K_{r,s}\operatorname{vec}(X)=\operatorname{vec}(X^T)\). In particular, \(K_{n,n}\operatorname{vec}(S)=\operatorname{vec}(S)\) when \(S\) is symmetric. This identity will verify that the full-vector transformation preserves symmetry.

Worked Example: Expanding and Extracting Symmetric Coordinates

Let \(S=\begin{pmatrix}s_{11}&s_{21}\\s_{21}&s_{22}\end{pmatrix}\). With the stated column-stacking and lower-triangular conventions, \(\operatorname{vech}(S)=(s_{11},s_{21},s_{22})^T\), whereas \(\operatorname{vec}(S)=(s_{11},s_{21},s_{21},s_{22})^T\). Therefore $$ D_2= \begin{pmatrix} 1&0&0\\ 0&1&0\\ 0&1&0\\ 0&0&1 \end{pmatrix}, \qquad L_2= \begin{pmatrix} 1&0&0&0\\ 0&1&0&0\\ 0&0&0&1 \end{pmatrix}. $$

Multiplying \(D_2\) by \((s_{11},s_{21},s_{22})^T\) gives \((s_{11},s_{21},s_{21},s_{22})^T\), as required. Multiplying this full vector by \(L_2\) returns \((s_{11},s_{21},s_{22})^T\). The middle entry is included once in \(\operatorname{vech}\), but twice in \(\operatorname{vec}\).

The Coordinate Map for \(ASA^T\)

Let \(S\) be a symmetric \(n\times n\) matrix and \(A\) an \(m\times n\) matrix. The transformed matrix \(ASA^T\) is symmetric and has size \(m\times m\). The standard vectorization identity \(\operatorname{vec}(AXB)=(B^T\otimes A)\operatorname{vec}(X)\) gives its full-vector coordinates. Duplication then replaces the input full vector by its distinct coordinates, and elimination extracts the output coordinates.

Theorem: For symmetric \(S\in\mathbb{R}^{n\times n}\) and \(A\in\mathbb{R}^{m\times n}\), $$ \operatorname{vech}(ASA^T) = L_m(A\otimes A)D_n\operatorname{vech}(S). $$ Thus the matrix \(T_A=L_m(A\otimes A)D_n\), of size \(m(m+1)/2\times n(n+1)/2\), is the coordinate map for this transformation.

Proof. First apply the vectorization identity with \(X=S\) and \(B=A^T\): $$ \operatorname{vec}(ASA^T)=((A^T)^T\otimes A)\operatorname{vec}(S) =(A\otimes A)\operatorname{vec}(S). $$ Because \(S\) is symmetric, \(\operatorname{vec}(S)=D_n\operatorname{vech}(S)\). Because \(ASA^T\) is an \(m\times m\) matrix, its lower-triangular coordinates are \(L_m\operatorname{vec}(ASA^T)\). Substituting the first equality into the second gives $$ \operatorname{vech}(ASA^T) =L_m(A\otimes A)D_n\operatorname{vech}(S), $$ which proves the formula. The dimensions agree: \(D_n\) maps \(n(n+1)/2\) coordinates to \(n^2\) entries, \(A\otimes A\) maps those to \(m^2\) entries, and \(L_m\) extracts \(m(m+1)/2\) coordinates. \(\square\)

Commutation matrices provide another check on the argument. Since \(K_{n,n}D_n=D_n\), duplicating a symmetric coordinate vector produces a vector unchanged by transposition. Also, for any \(A\), the identity \(K_{m,m}(A\otimes A)=(A\otimes A)K_{n,n}\) follows by applying both sides to \(\operatorname{vec}(X)\): each side gives \(\operatorname{vec}(AX^TA^T)\). Consequently, \((A\otimes A)D_n\) is unchanged by \(K_{m,m}\). It represents a symmetric output, as the matrix product \(ASA^T\) must.

Equivalently, the output can be symmetrized explicitly before extracting its coordinates: $$ T_A = L_m\frac{I_{m^2}+K_{m,m}}{2}(A\otimes A)D_n = L_m(A\otimes A)D_n. $$ The two expressions agree because the full output vector is already symmetric. The symmetrizer does not change the map; it makes the role of commutation visible.

Worked Example: Deriving the Map for a General Two-by-Two Transformation

Let \(A=\begin{pmatrix}a&b\\c&d\end{pmatrix}\) and \(S=\begin{pmatrix}s_{11}&s_{12}\\s_{12}&s_{22}\end{pmatrix}\), so that \(\operatorname{vech}(S)=(s_{11},s_{12},s_{22})^T\). The entries of \(ASA^T\) can be computed as row-by-column products. Its first diagonal entry is \(a^2s_{11}+2ab s_{12}+b^2s_{22}\); the factor \(2\) occurs because \(s_{12}\) appears in both off-diagonal positions of \(S\).

The lower-left entry is \(ac s_{11}+(ad+bc)s_{12}+bd s_{22}\), and the second diagonal entry is \(c^2s_{11}+2cd s_{12}+d^2s_{22}\). In the chosen lower-triangular order, these results give $$ \operatorname{vech}(ASA^T)= \begin{pmatrix} a^2&2ab&b^2\\ ac&ad+bc&bd\\ c^2&2cd&d^2 \end{pmatrix} \begin{pmatrix} s_{11}\\s_{12}\\s_{22} \end{pmatrix}. $$

The first and third rows calculate diagonal entries, so their off-diagonal input coefficients contain a factor of \(2\). The middle row calculates one off-diagonal entry of the transformed matrix, so its coefficient is \(ad+bc\), not twice that value.

Worked Example: Checking the Map Numerically

Take \(A=\begin{pmatrix}1&2\\-1&1\end{pmatrix}\) and \(S=\begin{pmatrix}2&1\\1&3\end{pmatrix}\). Here \(a=1\), \(b=2\), \(c=-1\), \(d=1\), and \(\operatorname{vech}(S)=(2,1,3)^T\). Substituting the entries of \(A\) into the general map gives $$ T_A= \begin{pmatrix} 1&4&4\\ -1&-1&2\\ 1&-2&1 \end{pmatrix}. $$

The coordinate calculation is $$ T_A\operatorname{vech}(S) = \begin{pmatrix} 1(2)+4(1)+4(3)\\ -1(2)-1(1)+2(3)\\ 1(2)-2(1)+1(3) \end{pmatrix} = \begin{pmatrix}18\\3\\3\end{pmatrix}. $$

Check by direct matrix multiplication: \(AS=\begin{pmatrix}4&7\\-1&2\end{pmatrix}\), so $$ ASA^T= \begin{pmatrix}4&7\\-1&2\end{pmatrix} \begin{pmatrix}1&-1\\2&1\end{pmatrix} = \begin{pmatrix}18&3\\3&3\end{pmatrix}. $$ Its lower-triangular coordinates are indeed \((18,3,3)^T\).

Composition and Reversibility

The coordinate map respects successive transformations. If \(B\) is an \(n\times r\) matrix and \(A\) is an \(m\times n\) matrix, then applying \(B\) first and \(A\) second transforms \(S\) to \(A(BSB^T)A^T=(AB)S(AB)^T\). The coordinate matrices obey the same rule.

Theorem: For compatible matrices \(A\) and \(B\), \(T_AT_B=T_{AB}\). If \(A\) is square and invertible, then \(T_A\) is invertible and \(T_A^{-1}=T_{A^{-1}}\).

Proof. Let \(S\) be any symmetric \(r\times r\) matrix. By the definition of each coordinate map, $$ T_AT_B\operatorname{vech}(S) =T_A\operatorname{vech}(BSB^T) =\operatorname{vech}\bigl(A(BSB^T)A^T\bigr) =\operatorname{vech}\bigl((AB)S(AB)^T\bigr) =T_{AB}\operatorname{vech}(S). $$ Every vector in \(\mathbb{R}^{r(r+1)/2}\) is \(\operatorname{vech}(S)\) for exactly one symmetric \(S\), since duplication fills out its entries. Thus the two matrices act identically on every input vector, proving \(T_AT_B=T_{AB}\). If \(A\) is square and invertible, the composition rule gives \(T_AT_{A^{-1}}=T_I\) and \(T_{A^{-1}}T_A=T_I\). The identity transformation has coordinate matrix \(T_I=I\), so \(T_{A^{-1}}\) is the inverse of \(T_A\). \(\square\)

Worked Example: A Rectangular Transformation

Let \(A=\begin{pmatrix}1&0&1\\0&1&1\end{pmatrix}\), and let \(S=\begin{pmatrix}1&2&0\\2&3&1\\0&1&2\end{pmatrix}\). For this \(3\times3\) input, the coordinate order is \(\operatorname{vech}(S)=(s_{11},s_{21},s_{31},s_{22},s_{32},s_{33})^T=(1,2,0,3,1,2)^T\).

The rows of \(A\) are \(u=(1,0,1)\) and \(v=(0,1,1)\). The upper-left output entry \(uSu^T\) has coefficients \((1,0,2,0,0,1)\) in the input coordinate order: it is \(s_{11}+2s_{13}+s_{33}\). The lower-left entry \(vSu^T\) has coefficients \((0,1,1,0,1,1)\), giving \(s_{21}+s_{31}+s_{32}+s_{33}\). The lower-right entry \(vSv^T\) has coefficients \((0,0,0,1,2,1)\), giving \(s_{22}+2s_{32}+s_{33}\). Therefore $$ T_A= \begin{pmatrix} 1&0&2&0&0&1\\ 0&1&1&0&1&1\\ 0&0&0&1&2&1 \end{pmatrix}, \qquad T_A\operatorname{vech}(S)= \begin{pmatrix}3\\5\\7\end{pmatrix}. $$

Direct multiplication confirms the result. The first output is \(1+2(0)+2=3\); the lower-left output is \(2+0+1+2=5\); and the second diagonal output is \(3+2(1)+2=7\). Thus \(ASA^T=\begin{pmatrix}3&5\\5&7\end{pmatrix}\), whose lower-triangular coordinates match the map.

Common Pitfall and Why the Map Matters

A frequent mistake is to use \((A\otimes A)\operatorname{vech}(S)\) as the answer. This is not dimensionally valid in general: \(A\otimes A\) expects a full vector of length \(n^2\), while \(\operatorname{vech}(S)\) has length \(n(n+1)/2\). The correction is to expand first with \(D_n\), then apply \(A\otimes A\), and finally extract the output coordinates with \(L_m\). Another error is to omit the factor \(2\) in diagonal-output coefficients such as \(2ab\). It appears because both symmetric entries \(s_{12}\) and \(s_{21}\) contribute to that diagonal calculation.

The map is useful whenever a symmetric matrix is represented by only its distinct entries, including transformations of covariance matrices and quadratic-form matrices. It turns a matrix transformation into an ordinary linear transformation between coordinate vectors, while preserving the symmetry structure that makes the reduced coordinates possible.

Key takeaway: For symmetric input coordinates, the transformation \(S\mapsto ASA^T\) is represented by \(T_A=L_m(A\otimes A)D_n\). Duplication expands the input, the Kronecker product performs the full-vector transformation, and elimination extracts the symmetric output coordinates.

Check Your Understanding

Use the stated column-stacking and lower-triangular coordinate order in answering these questions.

  1. For a symmetric \(3\times3\) matrix, write the entries of \(\operatorname{vech}(S)\) in order.
  2. If \(A\) is \(m\times n\), what are the dimensions of \(L_m\), \(A\otimes A\), and \(D_n\)?
  3. Explain why the coefficient of \(s_{12}\) in the first diagonal entry of \(ASA^T\), for a \(2\times2\) matrix \(A\), is \(2ab\).
  4. What does the identity \(K_{n,n}\operatorname{vec}(S)=\operatorname{vec}(S)\) express when \(S\) is symmetric?
  5. If \(A\) is square and invertible, what is the inverse of its coordinate map \(T_A\)?
Clinical Biostats