Matrix Transpose: Flipping Across the Diagonal
Problem
Find the transpose of A = [[1,2,3],[4,5,6]]. Explain how the transpose swaps rows with columns and list the key properties.
Explanation
Definition
The transpose of an matrix , written , is the matrix obtained by reflecting across its main diagonal. Equivalently:
Row of becomes column of , and vice versa.
Step-by-step
(2 rows × 3 columns).
- Row 1 of : → column 1 of .
- Row 2 of : → column 2 of .
Shape flips: is , is . Main diagonal entries (positions where ) stay the same; off-diagonal entries swap.
Key properties
- Double transpose: .
- Transpose of a sum: .
- Transpose of a product (swap order): .
- Transpose of inverse: .
- Transpose of a scalar multiple: .
The swap in surprises people. A quick sanity check: if is and is , then is so is . On the other side: is and is , so is . Dimensions match — and the identity holds entry-by-entry.
Special kinds of matrices
- Symmetric: . Only square matrices can be symmetric. Example: .
- Skew-symmetric: . All diagonal entries are zero.
- Orthogonal: , so .
Where transpose appears
- Dot products: when vectors are columns.
- Normal equations in least squares: .
- Gram matrix: — symmetric, positive semidefinite, central to SVD and QR.
- Quadratic forms: appears in optimization and statistics.
- Data science: "rows as samples / columns as features" vs. "rows as features / columns as samples" differ by transposition.
Common mistakes
- Forgetting the shape flip. A matrix transposes to a , not another .
- Mis-ordering the product transpose. is , not .
- Assuming diagonal entries change. On a square matrix, diagonal positions are fixed — the swap is only off-diagonal.
Try it in the visualization
A 2×3 matrix is drawn as a grid. Each cell flips across the main diagonal, swapping positions . Elements animate to their new positions while shape changes from wide to tall.
Interactive Visualization
Parameters
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.