Exercise: transpose, identity, symmetry
Goal
- Write the transpose \(A^\top\) of a small matrix by flipping rows and columns.
- Recognise the identity matrix \(I\) and see that \(IA = A\).
- Recognise when a matrix is symmetric (\(A = A^\top\)).
The rule
Transpose. \(A^\top\) turns rows into columns. The entry in row \(i\), column \(j\) of \(A\) becomes row \(j\), column \(i\) of \(A^\top\). The diagonal stays put; everything else reflects across it.
\[ A=\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \qquad\Longrightarrow\qquad A^\top=\begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix}. \]
Transposing twice gives back the original: \((A^\top)^\top = A\).
Identity. \(I\) has 1s on the diagonal and 0s everywhere else. Multiplying by it changes nothing: \(IA = A\) and \(AI = A\).
\[ I=\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}. \]
Symmetric. A matrix is symmetric when it equals its own transpose: \(A = A^\top\). In picture form, it is a mirror image across the diagonal — the entry at row \(i\), col \(j\) equals the entry at row \(j\), col \(i\).
\[ \begin{bmatrix} 1 & 5 \\ 5 & 9 \end{bmatrix}\text{ is symmetric}, \qquad \begin{bmatrix} 1 & 5 \\ 2 & 9 \end{bmatrix}\text{ is not.} \]
Problems
Write the transpose:
\(\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}^\top\)
\(\begin{bmatrix} 0 & 5 \\ 7 & 0 \end{bmatrix}^\top\)
\(\begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}^\top\)
\(\begin{bmatrix} 1 & 2 & 3 \end{bmatrix}^\top\) (a row becomes a column)
\(\begin{bmatrix} 4 \\ 5 \\ 6 \end{bmatrix}^\top\) (a column becomes a row)
\(\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}^\top\)
Transpose twice (\((A^\top)^\top = A\)):
- Take \(A=\begin{bmatrix} 8 & 1 \\ 0 & 2 \end{bmatrix}\). Write \(A^\top\), then transpose that result. What do you get back?
Multiply by the identity:
\(\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 6 & 7 \\ 8 & 9 \end{bmatrix}\)
\(\begin{bmatrix} 4 & 5 \\ 6 & 7 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\)
\(\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} 2 \\ 9 \\ 4 \end{bmatrix}\)
Without computing fully: what is \(I\,\mathbf{x}\) when \(\mathbf{x}=\begin{bmatrix} 3 \\ 1 \\ 5 \end{bmatrix}\) and \(I\) is \(3\times 3\)?
Is this matrix symmetric? (yes/no, and say why):
\(\begin{bmatrix} 1 & 2 \\ 2 & 3 \end{bmatrix}\)
\(\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\)
\(\begin{bmatrix} 5 & 0 \\ 0 & 7 \end{bmatrix}\)
\(\begin{bmatrix} 1 & 4 & 0 \\ 4 & 2 & 5 \\ 0 & 5 & 3 \end{bmatrix}\)
\(\begin{bmatrix} 1 & 4 & 0 \\ 4 & 2 & 5 \\ 0 & 6 & 3 \end{bmatrix}\)
A little harder:
Fill in the missing entry so that \(\begin{bmatrix} 0 & 7 \\ \square & 0 \end{bmatrix}\) is symmetric.
Is the identity matrix \(I\) symmetric? Explain in one line.
Check in R
Transpose is t. The identity is built with diag. To test symmetry, compare a matrix with its transpose using all and ==, or use isSymmetric.
A <- matrix(c(1, 2, 3, 4), nrow = 2, byrow = TRUE)
t(A)
# [,1] [,2]
# [1,] 1 3
# [2,] 2 4diag(3) # the 3x3 identity
# [,1] [,2] [,3]
# [1,] 1 0 0
# [2,] 0 1 0
# [3,] 0 0 1S <- matrix(c(1, 2, 2, 3), nrow = 2, byrow = TRUE)
all(S == t(S)) # TRUE -> symmetric
# [1] TRUE
isSymmetric(S)
# [1] TRUEHints
To transpose, leave the diagonal entries alone and swap each off-diagonal pair: the entry at (row 1, col 2) trades places with (row 2, col 1).
A \(1\times 3\) row turns into a \(3\times 1\) column, and vice versa. The numbers stay in the same order; only their orientation changes.
\(I A = A\) and \(A I = A\). You do not need to compute — the answer is just the other matrix, unchanged.
Compare the entry at (row \(i\), col \(j\)) with the one at (row \(j\), col \(i\)). If every such pair is equal, the matrix is symmetric. A single mismatch means it is not.
Step-by-step solutions
Problem 1. Diagonal \(1,4\) stays; swap the off-diagonal \(2\) and \(3\). \[\begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix}.\]
Problem 2. Diagonal \(0,0\) stays; swap \(5\) (row 1, col 2) and \(7\) (row 2, col 1). \[\begin{bmatrix} 0 & 7 \\ 5 & 0 \end{bmatrix}.\]
Problem 3. Off-diagonal entries are both \(0\), so swapping changes nothing. \[\begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}.\] (This is a diagonal matrix; diagonal matrices are their own transpose.)
Problem 4. A \(1\times 3\) row becomes a \(3\times 1\) column. \[\begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}.\]
Problem 5. A \(3\times 1\) column becomes a \(1\times 3\) row. \[\begin{bmatrix} 4 & 5 & 6 \end{bmatrix}.\]
Problem 6. A \(2\times 3\) matrix becomes \(3\times 2\). Row 1 \((1,2,3)\) becomes column 1; row 2 \((4,5,6)\) becomes column 2. \[\begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix}.\]
Problem 7. \(A=\begin{bmatrix}8&1\\0&2\end{bmatrix}\). First transpose: \(A^\top=\begin{bmatrix}8&0\\1&2\end{bmatrix}\). Transpose again: \((A^\top)^\top=\begin{bmatrix}8&1\\0&2\end{bmatrix}=A\). You get the original matrix back, illustrating \((A^\top)^\top = A\).
Problem 8. Multiplying by the identity on the left does nothing: \[\begin{bmatrix} 6 & 7 \\ 8 & 9 \end{bmatrix}.\]
Problem 9. Multiplying by the identity on the right does nothing: \[\begin{bmatrix} 4 & 5 \\ 6 & 7 \end{bmatrix}.\]
Problem 10. The \(3\times 3\) identity times the column leaves it unchanged: \[\begin{bmatrix} 2 \\ 9 \\ 4 \end{bmatrix}.\]
Problem 11. \(I\,\mathbf{x}=\mathbf{x}\), so the answer is \(\begin{bmatrix} 3 \\ 1 \\ 5 \end{bmatrix}\) — the identity leaves any vector unchanged.
Problem 12. Off-diagonal pair: (row 1, col 2) \(=2\) and (row 2, col 1) \(=2\). Equal, so yes, symmetric.
Problem 13. (row 1, col 2) \(=2\) but (row 2, col 1) \(=3\). Not equal, so no, not symmetric.
Problem 14. Off-diagonal entries are both \(0\). They match, so yes, symmetric (every diagonal matrix is symmetric).
Problem 15. Check the three off-diagonal pairs: \((1,2)\!=\!4=(2,1)\); \((1,3)\!=\!0=(3,1)\); \((2,3)\!=\!5=(3,2)\). All match, so yes, symmetric.
Problem 16. Check pairs: \((2,3)=5\) but \((3,2)=6\). They differ, so no, not symmetric.
Problem 17. For symmetry, (row 2, col 1) must equal (row 1, col 2) \(=7\). So \(\square = 7\): \[\begin{bmatrix} 0 & 7 \\ 7 & 0 \end{bmatrix}.\]
Problem 18. Yes. \(I\) has all off-diagonal entries equal to \(0\), so flipping across the diagonal changes nothing: \(I^\top = I\).