Tutorials › Linear Algebra › Symmetry in Structured Matrices

Symmetric Matrices and the Spectral Theorem · Tutorial 722 of 1000

Symmetry in Structured Matrices

Use matrix structure and entries to decide exactly when a real matrix is symmetric.

Advanced 10 min read

What You'll Learn

  • Apply the entrywise test for symmetry to structured matrices.
  • Decide when upper or lower triangular matrices are symmetric.
  • Check the adjacent entries of a tridiagonal matrix.
  • Compare corresponding blocks with their transposes.
  • Determine when an outer product of two vectors is symmetric.
  • Recognise common errors in symmetry checks.

Symmetry and Structure

A matrix may have a pattern that makes checking symmetry quicker than comparing every entry of the matrix with its transpose. Diagonal, triangular, tridiagonal, block, and rank-one matrices each have a particular structure, but that structure does not automatically make a matrix symmetric. The key is to identify which entries are paired by transposition and then check the conditions on those pairs.

Throughout, matrices and vectors are real. A matrix \(\mathbf{A}\in\mathbb{R}^{n\times n}\) is symmetric when \(\mathbf{A}^{\top}=\mathbf{A}\). Transposition exchanges rows and columns, so the entry in row \(i\), column \(j\) of \(\mathbf{A}^{\top}\) is \(a_{ji}\). Consequently, symmetry means \(a_{ij}=a_{ji}\) for every pair of indices \(i,j\). Entries on the main diagonal are paired with themselves; the conditions that matter are the matches across the diagonal.

Theorem (Entrywise symmetry test): A real square matrix \(\mathbf{A}=(a_{ij})\) is symmetric if and only if \(a_{ij}=a_{ji}\) for all \(i,j\).

Proof. By the definition of transpose, \((\mathbf{A}^{\top})_{ij}=a_{ji}\). Thus \(\mathbf{A}^{\top}=\mathbf{A}\) holds exactly when \((\mathbf{A}^{\top})_{ij}=a_{ij}\) at every position, which is exactly the condition \(a_{ji}=a_{ij}\) for all \(i,j\). \(\square\)

Diagonal and Triangular Matrices

A square matrix is diagonal if every entry outside its main diagonal is zero. Its entries already match across the diagonal: every off-diagonal entry and its reflected partner are both zero, while each diagonal entry matches itself. Therefore every real diagonal matrix is symmetric. This conclusion depends on the matrix being square, as required for symmetry.

Worked Example: A Diagonal Matrix

Check whether the diagonal matrix \(\mathbf{D}\) is symmetric.

$$ \mathbf{D}=\begin{bmatrix}2&0&0\\0&-1&0\\0&0&4\end{bmatrix}, \qquad \mathbf{D}^{\top}=\begin{bmatrix}2&0&0\\0&-1&0\\0&0&4\end{bmatrix} =\mathbf{D}. $$

Every off-diagonal entry is zero, and transposition leaves each diagonal entry in place. Hence \(\mathbf{D}\) is symmetric. The displayed transpose is also a direct check of the defining equality.

A square matrix is upper triangular if every entry below its main diagonal is zero; it is lower triangular if every entry above the diagonal is zero. In either case, symmetry forces the entries on the other side of the diagonal to vanish as well. Thus a triangular matrix is symmetric exactly when it is diagonal.

Theorem: A real square upper triangular or lower triangular matrix is symmetric if and only if it is diagonal.

Proof. Suppose first that \(\mathbf{A}\) is upper triangular and symmetric. For \(i<j\), upper triangularity gives \(a_{ji}=0\), because row \(j\) is below column \(i\). Symmetry gives \(a_{ij}=a_{ji}=0\). Thus every entry above the diagonal is zero, and upper triangularity already makes every entry below the diagonal zero. So \(\mathbf{A}\) is diagonal. If \(\mathbf{A}\) is lower triangular and symmetric, then for \(i<j\), lower triangularity gives \(a_{ij}=0\), and symmetry gives \(a_{ji}=a_{ij}=0\). The matrix is again diagonal. Conversely, a diagonal matrix has equal entries in each pair of transposed positions: both off-diagonal entries are zero, and diagonal entries are unchanged. It is therefore symmetric, whether regarded as upper or lower triangular. \(\square\)

Worked Example: A Triangular Matrix That Is Not Symmetric

Consider the upper triangular matrix below. Its zero entries below the diagonal do not make the entries above the diagonal disappear.

$$ \mathbf{T}=\begin{bmatrix}1&2&-1\\0&3&4\\0&0&5\end{bmatrix}, \qquad \mathbf{T}^{\top}=\begin{bmatrix}1&0&0\\2&3&0\\-1&4&5\end{bmatrix}. $$

For example, \(t_{12}=2\), whereas \(t_{21}=0\). Since these paired entries differ, \(\mathbf{T}^{\top}\ne\mathbf{T}\), so \(\mathbf{T}\) is not symmetric. In contrast, if the entries above the diagonal were also zero, the matrix would be diagonal and hence symmetric.

Tridiagonal Matrices

A square matrix is tridiagonal if \(a_{ij}=0\) whenever \(|i-j|>1\). Its only possibly nonzero entries are on the main diagonal and the two diagonals immediately beside it. The entries on the main diagonal need no extra test. For each neighboring pair of indices, symmetry requires the entry just above the main diagonal to match the entry just below it.

Theorem: A real tridiagonal matrix is symmetric if and only if \(a_{i,i+1}=a_{i+1,i}\) for every \(i\) with \(1\le i<n\).

Proof. If the matrix is symmetric, the entrywise symmetry test applied to the pair \((i,i+1)\) gives \(a_{i,i+1}=a_{i+1,i}\). Conversely, suppose all these adjacent pairs match. For \(i=j\), the entries match themselves. For \(|i-j|=1\), the assumed condition gives \(a_{ij}=a_{ji}\). For \(|i-j|>1\), tridiagonal structure gives \(a_{ij}=0\) and \(a_{ji}=0\), since \(|j-i|=|i-j|>1\). Thus every pair of transposed entries matches, so the matrix is symmetric. When \(n=1\), there are no adjacent pairs to check, and the same argument shows that every \(1\times1\) matrix is symmetric. \(\square\)

Worked Example: Checking a Tridiagonal Matrix

Test the tridiagonal matrix \(\mathbf{Q}\) for symmetry by checking the adjacent off-diagonal pairs, then verify by transposing.

$$ \mathbf{Q}=\begin{bmatrix} 2&-1&0&0\\ -1&3&4&0\\ 0&4&1&2\\ 0&0&2&5 \end{bmatrix}. $$

The adjacent pairs agree: \(q_{12}=-1=q_{21}\), \(q_{23}=4=q_{32}\), and \(q_{34}=2=q_{43}\). All entries farther from the main diagonal are zero on both sides. Therefore the criterion applies, and transposition confirms the result:

$$ \mathbf{Q}^{\top}=\begin{bmatrix} 2&-1&0&0\\ -1&3&4&0\\ 0&4&1&2\\ 0&0&2&5 \end{bmatrix} =\mathbf{Q}. $$

If \(q_{34}\) were changed from \(2\) to \(0\) while \(q_{43}\) stayed \(2\), the matrix would still be tridiagonal but would not be symmetric. Tridiagonal structure limits which entries can be nonzero; it does not make the remaining entries match automatically.

Block Matrices

A block matrix divides a matrix into smaller rectangular submatrices called blocks. For a square block matrix with matching row and column partitions, the block in position \((i,j)\) has a corresponding block in position \((j,i)\). Transposing the whole matrix both swaps these positions and transposes each individual block. Thus a diagonal block must be symmetric, while each off-diagonal block must match the transpose of its partner.

Theorem (Block symmetry test): Let \(\mathbf{A}=(\mathbf{A}_{ij})\) be a real square matrix partitioned into blocks with matching row and column block sizes. It is symmetric if and only if \(\mathbf{A}_{ii}^{\top}=\mathbf{A}_{ii}\) for every diagonal block and \(\mathbf{A}_{ji}=\mathbf{A}_{ij}^{\top}\) for every pair \(i\ne j\).

Proof. In the block at position \((i,j)\), the transpose \(\mathbf{A}^{\top}\) has the block \(\mathbf{A}_{ji}^{\top}\). Equality \(\mathbf{A}^{\top}=\mathbf{A}\) therefore holds exactly when \(\mathbf{A}_{ij}=\mathbf{A}_{ji}^{\top}\) for all block indices \(i,j\). When \(i=j\), this condition is \(\mathbf{A}_{ii}=\mathbf{A}_{ii}^{\top}\). When \(i\ne j\), it is equivalent, by transposing both sides, to \(\mathbf{A}_{ji}=\mathbf{A}_{ij}^{\top}\). These are precisely the stated conditions, so they are necessary and sufficient. \(\square\)

Worked Example: A Symmetric Block Matrix

Use the block test on a matrix partitioned into one row and column of size \(1\), followed by one of size \(2\):

$$ \mathbf{A}= \begin{bmatrix} [2]&\begin{matrix}1&-1\end{matrix}\\ \begin{matrix}1\\-1\end{matrix}& \begin{bmatrix}3&0\\0&4\end{bmatrix} \end{bmatrix} = \begin{bmatrix} 2&1&-1\\ 1&3&0\\ -1&0&4 \end{bmatrix}. $$

The first diagonal block \([2]\) is symmetric, and the second diagonal block is symmetric because its transpose is itself. The upper-right block is \(\begin{bmatrix}1&-1\end{bmatrix}\), whose transpose is the lower-left block \(\begin{bmatrix}1\\-1\end{bmatrix}\). The block conditions all hold. Directly, \(\mathbf{A}^{\top}=\begin{bmatrix}2&1&-1\\1&3&0\\-1&0&4\end{bmatrix}=\mathbf{A}\), confirming symmetry.

A useful special case is a block diagonal matrix: all off-diagonal blocks are zero. The block test says that it is symmetric exactly when each diagonal block is symmetric. It is not enough for the full matrix to have zero blocks away from its block diagonal; any diagonal block that fails to be symmetric makes the full matrix nonsymmetric.

Rank-One Matrices

For column vectors \(\mathbf{u},\mathbf{v}\in\mathbb{R}^n\), the outer product \(\mathbf{u}\mathbf{v}^{\top}\) is the \(n\times n\) matrix whose \((i,j)\) entry is \(u_i v_j\). It has rank at most one, which motivates the term rank-one matrix when both vectors are nonzero. The outer product is symmetric precisely when the two vectors are linearly dependent—that is, when one is a scalar multiple of the other, including the case where at least one vector is zero.

Theorem: For \(\mathbf{u},\mathbf{v}\in\mathbb{R}^n\), the matrix \(\mathbf{u}\mathbf{v}^{\top}\) is symmetric if and only if \(\mathbf{u}\) and \(\mathbf{v}\) are linearly dependent.

Proof. The transpose of \(\mathbf{u}\mathbf{v}^{\top}\) is \(\mathbf{v}\mathbf{u}^{\top}\). If \(\mathbf{u}\) and \(\mathbf{v}\) are linearly dependent, then either \(\mathbf{u}=\mathbf{0}\) or \(\mathbf{v}=c\mathbf{u}\) for some real \(c\). In the first case \(\mathbf{u}\mathbf{v}^{\top}=\mathbf{O}\) is symmetric. In the second case, \(\mathbf{u}\mathbf{v}^{\top}=c\mathbf{u}\mathbf{u}^{\top}\), whose transpose is itself. Conversely, suppose \(\mathbf{u}\mathbf{v}^{\top}\) is symmetric. If \(\mathbf{u}=\mathbf{0}\), the vectors are linearly dependent. If \(\mathbf{u}\ne\mathbf{0}\), choose an index \(k\) with \(u_k\ne0\). Symmetry gives \(u_i v_k=v_i u_k\) for every \(i\), so \(v_i=(v_k/u_k)u_i\) for every \(i\). Hence \(\mathbf{v}=(v_k/u_k)\mathbf{u}\), and the vectors are linearly dependent. \(\square\)

Worked Example: Two Outer Products

First take \(\mathbf{u}=\begin{bmatrix}1\\2\end{bmatrix}\) and \(\mathbf{v}=\begin{bmatrix}3\\6\end{bmatrix}\). Since \(\mathbf{v}=3\mathbf{u}\), the theorem predicts symmetry. Compute the product:

$$ \mathbf{u}\mathbf{v}^{\top} =\begin{bmatrix}1\\2\end{bmatrix} \begin{bmatrix}3&6\end{bmatrix} =\begin{bmatrix}3&6\\6&12\end{bmatrix}, \qquad (\mathbf{u}\mathbf{v}^{\top})^{\top} =\begin{bmatrix}3&6\\6&12\end{bmatrix}. $$

The matrix equals its transpose, as claimed. Now use \(\mathbf{x}=\begin{bmatrix}1\\2\end{bmatrix}\) and \(\mathbf{y}=\begin{bmatrix}2\\1\end{bmatrix}\). These vectors are not scalar multiples: the first coordinate would require the scalar to be \(2\), but the second would require it to be \(1/2\). The product and its transpose are

$$ \mathbf{x}\mathbf{y}^{\top} =\begin{bmatrix}1\\2\end{bmatrix} \begin{bmatrix}2&1\end{bmatrix} =\begin{bmatrix}2&1\\4&2\end{bmatrix}, \qquad (\mathbf{x}\mathbf{y}^{\top})^{\top} =\begin{bmatrix}2&4\\1&2\end{bmatrix}. $$

They differ in their off-diagonal entries, so this outer product is not symmetric. Both computations agree with the dependence criterion.

Common Pitfalls and a Practical Checklist

Pitfall: assuming triangular means symmetric. A tempting but incorrect check is to look at \(\mathbf{T}=\begin{bmatrix}1&2\\0&3\end{bmatrix}\), note its triangular pattern, and conclude that it is symmetric. But the paired entries are \(t_{12}=2\) and \(t_{21}=0\), so \(\mathbf{T}^{\top}=\begin{bmatrix}1&0\\2&3\end{bmatrix}\ne\mathbf{T}\). The correction is to use the triangular criterion: a triangular matrix is symmetric only if its off-diagonal entries are all zero, making it diagonal.

Pitfall: comparing blocks without transposing them. In a symmetric block matrix, the block below the diagonal must be the transpose of the block above it, not necessarily an identical copy. For instance, \(\begin{bmatrix}1&-1\end{bmatrix}\) and \(\begin{bmatrix}1\\-1\end{bmatrix}\) are correctly paired because one is the transpose of the other. Their different shapes are required by the block sizes.

For a quick check, first confirm that the matrix is square. Then identify its structure, list only the entry or block pairs that are not already forced to be zero, and compare each pair with its transpose. For a rank-one outer product, check whether the two vectors are scalar multiples rather than assuming that every outer product is symmetric.

StructureSymmetry test
DiagonalAlways symmetric
Upper or lower triangularSymmetric exactly when diagonal
TridiagonalMatch each adjacent pair \(a_{i,i+1}\) and \(a_{i+1,i}\)
Block matrixDiagonal blocks symmetric; paired off-diagonal blocks are transposes
\(\mathbf{u}\mathbf{v}^{\top}\)Symmetric exactly when \(\mathbf{u}\) and \(\mathbf{v}\) are dependent

Check Your Understanding

Use the appropriate structural test in each question. For any matrix you classify, identify the entries or blocks that decide the result.

  1. Is \(\begin{bmatrix}4&0&0\\0&-2&0\\0&0&7\end{bmatrix}\) symmetric? State the structural reason.
  2. What condition on the entries above the diagonal makes an upper triangular matrix symmetric?
  3. For a tridiagonal \(3\times3\) matrix, which two pairs of entries must be checked?
  4. In a symmetric block matrix, what must the block in position \((2,1)\) equal in terms of the block in position \((1,2)\)?
  5. Are \(\mathbf{u}=\begin{bmatrix}2\\-1\end{bmatrix}\) and \(\mathbf{v}=\begin{bmatrix}-6\\3\end{bmatrix}\) the factors of a symmetric outer product \(\mathbf{u}\mathbf{v}^{\top}\)? Justify using their relationship.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon