Transpose of a Matrix
The transpose of a matrix A, written Aᵀ, is the matrix made by turning the rows of A into columns: row i of A becomes column i of Aᵀ, so the entry in row i, column j of Aᵀ is the entry in row j, column i of A. An m × n matrix has an n × m transpose.
Before this lesson: Matrix Operations and Matrix Multiplication
What the transpose does
Transposing flips a matrix across its main diagonal, the entries a₁₁, a₂₂, a₃₃, … that run from the top left down to the right. Entries on the diagonal stay where they are; every other entry trades places with its mirror image across the diagonal.
(A^{T})_{ij} = a_{ji}A column vector becomes a row vector and the other way around. This is why the dot product of two column vectors u and v in ℝⁿ can be written as the matrix product uᵀv, a 1 × n row times an n × 1 column.
Transpose rules
For matrices of sizes where each side is defined, and any scalar c:
| Rule | In words |
|---|---|
| (A^{T})^{T} = A | Transposing twice gives back A. |
| (A + B)^{T} = A^{T} + B^{T} | The transpose of a sum is the sum of the transposes. |
| (cA)^{T} = cA^{T} | Scalars come out unchanged. |
| (AB)^{T} = B^{T}A^{T} | The transpose of a product is the product of the transposes in reverse order. |
The reverse order in the last rule matters. If A is m × n and B is n × p, then (AB)ᵀ is p × m. The product BᵀAᵀ is (p × n)(n × m) = p × m, but AᵀBᵀ is (n × m)(p × n), which is usually not even defined.
Symmetric matrices
A square matrix is symmetric if Aᵀ = A, which means aᵢⱼ = aⱼᵢ for every i and j: the entries mirror each other across the main diagonal. A square matrix is skew-symmetric if Aᵀ = −A, so its diagonal entries are all 0.
For any matrix A, the products AᵀA and AAᵀ are always symmetric, because (AᵀA)ᵀ = Aᵀ(Aᵀ)ᵀ = AᵀA. These products appear again in least-squares solutions and the singular value decomposition.
How to find the transpose of a matrix
- Write the size of A, m × n. The transpose will be n × m.
- Copy row 1 of A, in order, as column 1 of Aᵀ.
- Do the same for each remaining row: row i becomes column i.
- Check: the diagonal entries should not move, and entry (i, j) of Aᵀ should equal entry (j, i) of A.
Transpose of a matrix examples
Example 1: Transpose a 2 × 3 matrix
Find the transpose of A = [2 −1 4; 0 3 5] (rows separated by a semicolon).
A = \begin{bmatrix} 2 & -1 & 4 \\ 0 & 3 & 5 \end{bmatrix}A is 2 × 3, so Aᵀ is 3 × 2.
\text{column 1 of } A^{T} = (2, -1, 4)Row 1 of A becomes column 1.
\text{column 2 of } A^{T} = (0, 3, 5)Row 2 of A becomes column 2.
A^{T} = \begin{bmatrix} 2 & 0 \\ -1 & 3 \\ 4 & 5 \end{bmatrix}Write the two columns side by side.
Answer: Aᵀ = [2 0; −1 3; 4 5]. Check: entry (3, 2) of Aᵀ is 5, the same as entry (2, 3) of A.
Example 2: The transpose of a product
Let A = [1 2; 3 0] and B = [2 −1; 1 4]. Find (AB)ᵀ and check that it equals BᵀAᵀ but not AᵀBᵀ.
AB = \begin{bmatrix} 1(2) + 2(1) & 1(-1) + 2(4) \\ 3(2) + 0(1) & 3(-1) + 0(4) \end{bmatrix}Multiply rows of A by columns of B (see matrix multiplication).
= \begin{bmatrix} 4 & 7 \\ 6 & -3 \end{bmatrix}Multiply and add in each entry.
(AB)^{T} = \begin{bmatrix} 4 & 6 \\ 7 & -3 \end{bmatrix}Rows of AB become columns.
B^{T} = \begin{bmatrix} 2 & 1 \\ -1 & 4 \end{bmatrix},\; A^{T} = \begin{bmatrix} 1 & 3 \\ 2 & 0 \end{bmatrix}Transpose B and A.
B^{T}A^{T} = \begin{bmatrix} 2(1) + 1(2) & 2(3) + 1(0) \\ -1(1) + 4(2) & -1(3) + 4(0) \end{bmatrix} = \begin{bmatrix} 4 & 6 \\ 7 & -3 \end{bmatrix}Multiply in the reverse order: this matches (AB)ᵀ.
A^{T}B^{T} = \begin{bmatrix} 1(2) + 3(-1) & 1(1) + 3(4) \\ 2(2) + 0(-1) & 2(1) + 0(4) \end{bmatrix} = \begin{bmatrix} -1 & 13 \\ 4 & 2 \end{bmatrix}Multiply in the same order: this does not match.
Answer: (AB)ᵀ = BᵀAᵀ = [4 6; 7 −3], while AᵀBᵀ = [−1 13; 4 2].
Example 3: Symmetric or not?
(a) Is A = [1 4 −2; 4 0 7; −2 7 3] symmetric? (b) Find k so that B = [3 k + 1; 5 2] is symmetric.
a_{12} = 4 = a_{21}(a) Compare the entries above the diagonal with their mirror images.
a_{13} = -2 = a_{31}Row 1, column 3 and row 3, column 1 match.
a_{23} = 7 = a_{32}Row 2, column 3 and row 3, column 2 match.
k + 1 = 5
(b) B is symmetric when b₁₂ = b₂₁.
k = 4
Subtract 1 from both sides.
Answer: (a) A is symmetric, so Aᵀ = A. (b) k = 4, which makes B = [3 5; 5 2].
Example 4: AᵀA is symmetric
Let A = [1 2; 0 1; 3 −1]. Find AᵀA and check that it is symmetric.
A^{T} = \begin{bmatrix} 1 & 0 & 3 \\ 2 & 1 & -1 \end{bmatrix}A is 3 × 2, so Aᵀ is 2 × 3.
A^{T}A = \begin{bmatrix} 1(1) + 0(0) + 3(3) & 1(2) + 0(1) + 3(-1) \\ 2(1) + 1(0) + (-1)(3) & 2(2) + 1(1) + (-1)(-1) \end{bmatrix}Multiply the 2 × 3 matrix by the 3 × 2 matrix.
= \begin{bmatrix} 10 & -1 \\ -1 & 6 \end{bmatrix}Multiply and add in each entry.
Answer: AᵀA = [10 −1; −1 6]. Its off-diagonal entries are both −1, so it is symmetric, as the rule (AᵀA)ᵀ = AᵀA predicts.
Example 5: Revenue from a sales table
Two stores sell three products. The sales matrix Q has one row per store and one column per product: Q = [12 30 8; 20 15 5]. The prices are p = (4.50, 2.00, 10.00) dollars. Find each store’s revenue, and write the answer as a row vector with a transpose.
Qp = \begin{bmatrix} 12(4.5) + 30(2) + 8(10) \\ 20(4.5) + 15(2) + 5(10) \end{bmatrix}Revenue = sales times price, added over the three products.
= \begin{bmatrix} 54 + 60 + 80 \\ 90 + 30 + 50 \end{bmatrix}Multiply each pair.
= \begin{bmatrix} 194 \\ 170 \end{bmatrix}Add.
(Qp)^{T} = p^{T}Q^{T} = \begin{bmatrix} 194 & 170 \end{bmatrix}The product rule in reverse order turns the column of revenues into a row.
Answer: store 1 takes in $194 and store 2 takes in $170. As a row vector, pᵀQᵀ = [194 170].
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Keeping the same order in a product | Writing (AB)ᵀ = AᵀBᵀ in Example 2 | Reverse the order: (AB)ᵀ = BᵀAᵀ. |
| Turning rows into rows | Writing the transpose of [2 −1 4; 0 3 5] as [4 −1 2; 5 3 0] | Transposing is not a mirror image left to right. Row i becomes column i. |
| Keeping the size | Expecting the transpose of a 2 × 3 matrix to be 2 × 3 | An m × n matrix has an n × m transpose. |
| Calling a non-square matrix symmetric | Saying [1 2 3; 2 1 2] is symmetric because its rows look alike | Only a square matrix can satisfy Aᵀ = A. |
| Moving the diagonal entries | Swapping a₁₁ and a₂₂ while transposing | The main diagonal stays fixed; only entries off the diagonal trade places. |
Related ideas
Transpose and determinants. A square matrix and its transpose have the same determinant, det(Aᵀ) = det A. The determinant of a matrix lesson shows how to compute it; Properties of Determinants proves this rule.
Transpose and inverses. If A is invertible, so is Aᵀ, and (Aᵀ)⁻¹ = (A⁻¹)ᵀ (see inverse matrices). Symmetric matrices return in Orthogonal Diagonalization (coming soon), where every symmetric matrix turns out to have real eigenvalues.
Practice problems
- Find the transpose of [3 −2; 0 7; 1 5].
- Find the transpose of the row vector [1 −4 6].
- A = [2 1; 0 3] and B = [1 −1; 2 2]. Find (A + B)ᵀ and Aᵀ + Bᵀ.
- A = [1 −2 0; 4 1 3]. Find (3A)ᵀ.
- Which is symmetric: C = [0 2; 2 1] or D = [1 2; 3 1]?
- Find a and b so that [1 a 3; 2 4 b; 3 −5 6] is symmetric.
- A = [1 1; 0 2] and B = [3 0; 1 1]. Check that (AB)ᵀ = BᵀAᵀ.
- u = (2, −1, 3) and v = (4, 5, −2) are column vectors. Find uᵀv.
- A = [1 2 0; −1 1 3]. Find AAᵀ.
- A = [1 4; 2 3]. Show that A − Aᵀ is skew-symmetric.
Show answers
1.
\begin{bmatrix} 3 & -2 \\ 0 & 7 \\ 1 & 5 \end{bmatrix}^{T} = \begin{bmatrix} 3 & 0 & 1 \\ -2 & 7 & 5 \end{bmatrix}Rows (3, −2), (0, 7) and (1, 5) become columns.
Answer: [3 0 1; −2 7 5], a 2 × 3 matrix.
2.
\begin{bmatrix} 1 & -4 & 6 \end{bmatrix}^{T} = \begin{bmatrix} 1 \\ -4 \\ 6 \end{bmatrix}The single row becomes a single column.
Answer: the column vector with entries 1, −4, 6.
3.
A + B = \begin{bmatrix} 2 + 1 & 1 + (-1) \\ 0 + 2 & 3 + 2 \end{bmatrix} = \begin{bmatrix} 3 & 0 \\ 2 & 5 \end{bmatrix}Add entry by entry.
(A + B)^{T} = \begin{bmatrix} 3 & 2 \\ 0 & 5 \end{bmatrix}Transpose the sum.
A^{T} + B^{T} = \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix} + \begin{bmatrix} 1 & 2 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} 3 & 2 \\ 0 & 5 \end{bmatrix}Transpose first, then add.
Answer: both equal [3 2; 0 5].
4.
3A = \begin{bmatrix} 3 & -6 & 0 \\ 12 & 3 & 9 \end{bmatrix}Multiply every entry by 3.
(3A)^{T} = \begin{bmatrix} 3 & 12 \\ -6 & 3 \\ 0 & 9 \end{bmatrix}Rows become columns.
Answer: [3 12; −6 3; 0 9], which equals 3Aᵀ.
5.
c_{12} = 2 = c_{21}C: the off-diagonal entries match.
d_{12} = 2 \ne 3 = d_{21}D: the off-diagonal entries differ.
Answer: C is symmetric; D is not.
6.
a = 2
Entry (1, 2) must equal entry (2, 1), which is 2.
b = -5
Entry (2, 3) must equal entry (3, 2), which is −5.
Answer: a = 2 and b = −5. Entry (1, 3) = 3 already equals entry (3, 1) = 3.
7.
AB = \begin{bmatrix} 1(3) + 1(1) & 1(0) + 1(1) \\ 0(3) + 2(1) & 0(0) + 2(1) \end{bmatrix} = \begin{bmatrix} 4 & 1 \\ 2 & 2 \end{bmatrix}Multiply A by B.
(AB)^{T} = \begin{bmatrix} 4 & 2 \\ 1 & 2 \end{bmatrix}Transpose the product.
B^{T}A^{T} = \begin{bmatrix} 3 & 1 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 1 & 2 \end{bmatrix} = \begin{bmatrix} 3(1) + 1(1) & 3(0) + 1(2) \\ 0(1) + 1(1) & 0(0) + 1(2) \end{bmatrix}Multiply the transposes in reverse order.
= \begin{bmatrix} 4 & 2 \\ 1 & 2 \end{bmatrix}Multiply and add.
Answer: both equal [4 2; 1 2].
8.
u^{T}v = 2(4) + (-1)(5) + 3(-2)A 1 × 3 row times a 3 × 1 column.
= 8 - 5 - 6
Multiply each pair.
= -3
Add.
Answer: uᵀv = −3, the dot product u · v.
9.
A^{T} = \begin{bmatrix} 1 & -1 \\ 2 & 1 \\ 0 & 3 \end{bmatrix}Transpose A.
AA^{T} = \begin{bmatrix} 1(1) + 2(2) + 0(0) & 1(-1) + 2(1) + 0(3) \\ -1(1) + 1(2) + 3(0) & -1(-1) + 1(1) + 3(3) \end{bmatrix}Multiply the 2 × 3 matrix by the 3 × 2 matrix.
= \begin{bmatrix} 5 & 1 \\ 1 & 11 \end{bmatrix}Multiply and add.
Answer: AAᵀ = [5 1; 1 11], a symmetric matrix.
10.
A - A^{T} = \begin{bmatrix} 1 & 4 \\ 2 & 3 \end{bmatrix} - \begin{bmatrix} 1 & 2 \\ 4 & 3 \end{bmatrix} = \begin{bmatrix} 0 & 2 \\ -2 & 0 \end{bmatrix}Subtract the transpose entry by entry.
(A - A^{T})^{T} = \begin{bmatrix} 0 & -2 \\ 2 & 0 \end{bmatrix} = -\begin{bmatrix} 0 & 2 \\ -2 & 0 \end{bmatrix}Transpose the result and factor out −1.
Answer: (A − Aᵀ)ᵀ = −(A − Aᵀ), so A − Aᵀ is skew-symmetric.
Transpose of a matrix FAQ
How do you find the transpose of a matrix?
Write each row of the matrix as a column, in the same order. Row 1 becomes column 1, row 2 becomes column 2, and so on.
What is the transpose of a product of matrices?
It is the product of the transposes in reverse order: (AB)ᵀ = BᵀAᵀ. The same holds for longer products, such as (ABC)ᵀ = CᵀBᵀAᵀ.
What is a symmetric matrix?
A square matrix that equals its own transpose, Aᵀ = A. Its entries mirror each other across the main diagonal.
Does the transpose change the determinant?
No. For any square matrix, det(Aᵀ) = det A.
Summary
- The transpose Aᵀ turns rows into columns: (Aᵀ)ᵢⱼ = aⱼᵢ, and an m × n matrix has an n × m transpose.
- (Aᵀ)ᵀ = A, (A + B)ᵀ = Aᵀ + Bᵀ and (cA)ᵀ = cAᵀ.
- (AB)ᵀ = BᵀAᵀ: reverse the order.
- A square matrix is symmetric if Aᵀ = A and skew-symmetric if Aᵀ = −A.
- AᵀA and AAᵀ are always symmetric, and uᵀv is the dot product.
Previous lesson: Composition of Linear Transformations
Next lesson: Elementary Matrices
Back to the Linear Algebra Index