Lesson 7 of 8
Transpose a matrix
Swap rows and columns, and see why the size of a matrix can change.
The idea
The transpose of a matrix A, written A transpose (say “A transpose”), turns every row into a column. Row 1 of A becomes column 1 of A transpose, row 2 becomes column 2, and so on.
Row 1 of A is 1, 2. It now runs down column 1. Row 2 of A is 3, 4. It now runs down column 2. Entries on the diagonal from top left to bottom right stay where they are.
Another way to see it
The entry in row i, column j of A transpose is the entry in row j, column i of A. The two numbers in the position simply swap.
When the matrix is not square
If A has 2 rows and 3 columns, its 2 rows become 2 columns, and its 3 columns become 3 rows. So the transpose of a 2×3 matrix is a 3×2 matrix. The shape changes.
Find A transpose, the transpose of A.
A is 2×3, so its transpose is 3×2. The answer grid already has that size.
Turn rows into columns
- Row 1 of A, (1, 2, 3), becomes column 1 of Aᵀ.
- Row 2 of A, (4, 5, 6), becomes column 2 of Aᵀ.
Write the result
A transpose equals a 3 by 2 matrix, row 1: 1, 4; row 2: 2, 5; row 3: 3, 6Notice the size
A had 2 rows and 3 columns. Aᵀ has 3 rows and 2 columns.
Common mistakes
- Copying A unchanged. Each row has to move into a column.
- Reshaping instead of transposing. Pouring 1, 2, 3, 4, 5, 6 into a 3×2 grid in reading order gives the wrong matrix. Write each row of A down a column.
- Keeping the old size. A 2×3 matrix has a 3×2 transpose.