Intuition The one-line idea
The transpose flips a matrix across its main diagonal : rows become columns and columns become rows. Nothing is added or destroyed — you are just relabelling which index comes first. Everything else (the "reverse-order" rule, symmetry, dot products) falls out of this single flip.
For a matrix A A A of shape m × n m \times n m × n with entries A i j A_{ij} A ij (row i i i , column j j j ), the transpose A ⊤ A^\top A ⊤ is the n × m n \times m n × m matrix defined by
( A ⊤ ) i j = A j i . (A^\top)_{ij} = A_{ji}. ( A ⊤ ) ij = A j i .
The entry in row i i i , column j j j of A ⊤ A^\top A ⊤ is the entry in row j j j , column i i i of A A A .
WHY this definition? The main diagonal (entries A i i A_{ii} A ii ) stays put — a "mirror line". Off-diagonal entries swap partners: whatever sat at ( j , i ) (j,i) ( j , i ) moves to ( i , j ) (i,j) ( i , j ) . So the shape m × n m\times n m × n becomes n × m n\times m n × m .
Worked example Basic flip
A = [ 1 2 3 4 5 6 ] ( 2 × 3 ) ⟹ A ⊤ = [ 1 4 2 5 3 6 ] ( 3 × 2 ) . A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \quad (2\times 3) \implies A^\top = \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix} \quad (3\times 2). A = [ 1 4 2 5 3 6 ] ( 2 × 3 ) ⟹ A ⊤ = 1 2 3 4 5 6 ( 3 × 2 ) .
Why this step? Row 1 of A A A is ( 1 , 2 , 3 ) (1,2,3) ( 1 , 2 , 3 ) ; it becomes column 1 of A ⊤ A^\top A ⊤ . Check: ( A ⊤ ) 21 = A 12 = 2 (A^\top)_{21} = A_{12} = 2 ( A ⊤ ) 21 = A 12 = 2 . ✓
Everything below is proved from the single rule ( A ⊤ ) i j = A j i (A^\top)_{ij} = A_{ji} ( A ⊤ ) ij = A j i . No memorising.
( ( A ⊤ ) ⊤ ) i j = ( A ⊤ ) j i = A i j ⟹ ( A ⊤ ) ⊤ = A . \big((A^\top)^\top\big)_{ij} = (A^\top)_{ji} = A_{ij} \implies (A^\top)^\top = A. ( ( A ⊤ ) ⊤ ) ij = ( A ⊤ ) j i = A ij ⟹ ( A ⊤ ) ⊤ = A .
Why? Flipping twice returns every entry to its home. So ⊤ \top ⊤ is an involution .
( ( A + B ) ⊤ ) i j = ( A + B ) j i = A j i + B j i = ( A ⊤ ) i j + ( B ⊤ ) i j . ((A+B)^\top)_{ij} = (A+B)_{ji} = A_{ji}+B_{ji} = (A^\top)_{ij}+(B^\top)_{ij}. (( A + B ) ⊤ ) ij = ( A + B ) j i = A j i + B j i = ( A ⊤ ) ij + ( B ⊤ ) ij .
Why? Transpose only moves entries around; addition is done entry-by-entry, so the two operations commute.
Start from the matrix-product definition ( A B ) i j = ∑ k A i k B k j (AB)_{ij} = \sum_k A_{ik}B_{kj} ( A B ) ij = ∑ k A ik B k j :
( ( A B ) ⊤ ) i j = ( A B ) j i = ∑ k A j k B k i . \big((AB)^\top\big)_{ij} = (AB)_{ji} = \sum_k A_{jk}B_{ki}. ( ( A B ) ⊤ ) ij = ( A B ) j i = ∑ k A j k B k i .
Now rewrite each factor using the transpose rule (A j k = ( A ⊤ ) k j A_{jk}=(A^\top)_{kj} A j k = ( A ⊤ ) k j , B k i = ( B ⊤ ) i k B_{ki}=(B^\top)_{ik} B k i = ( B ⊤ ) ik ):
= ∑ k ( B ⊤ ) i k ( A ⊤ ) k j = ( B ⊤ A ⊤ ) i j . = \sum_k (B^\top)_{ik}(A^\top)_{kj} = (B^\top A^\top)_{ij}. = ∑ k ( B ⊤ ) ik ( A ⊤ ) k j = ( B ⊤ A ⊤ ) ij .
Hence ( A B ) ⊤ = B ⊤ A ⊤ (AB)^\top = B^\top A^\top ( A B ) ⊤ = B ⊤ A ⊤ .
reverses
Think of dimensions: if A A A is m × n m\times n m × n and B B B is n × p n\times p n × p , then A B AB A B is m × p m\times p m × p , so ( A B ) ⊤ (AB)^\top ( A B ) ⊤ is p × m p\times m p × m . The only way to get p × m p\times m p × m from the transposes is B ⊤ ( p × n ) B^\top (p\times n) B ⊤ ( p × n ) times A ⊤ ( n × m ) A^\top (n\times m) A ⊤ ( n × m ) . The order is forced by shape-matching — it can't be A ⊤ B ⊤ A^\top B^\top A ⊤ B ⊤ (shapes wouldn't even fit).
Transpose both sides of A A − 1 = I A A^{-1} = I A A − 1 = I using rule 3 (and I ⊤ = I I^\top = I I ⊤ = I ):
( A − 1 ) ⊤ A ⊤ = I ⟹ ( A − 1 ) ⊤ = ( A ⊤ ) − 1 . (A^{-1})^\top A^\top = I \implies (A^{-1})^\top = (A^\top)^{-1}. ( A − 1 ) ⊤ A ⊤ = I ⟹ ( A − 1 ) ⊤ = ( A ⊤ ) − 1 .
Notation A − ⊤ A^{-\top} A − ⊤ is shorthand for this common object.
The Leibniz formula sums over permutations σ \sigma σ : each product ∏ i A i , σ ( i ) \prod_i A_{i,\sigma(i)} ∏ i A i , σ ( i ) becomes ∏ i A σ ( i ) , i \prod_i A_{\sigma(i),i} ∏ i A σ ( i ) , i under transpose, which is just the same sum reindexed by σ − 1 \sigma^{-1} σ − 1 (same sign). So the total is identical.
Definition Symmetric / skew-symmetric
A A A is symmetric if A ⊤ = A A^\top = A A ⊤ = A (so A i j = A j i A_{ij}=A_{ji} A ij = A j i ).
A A A is skew-symmetric (antisymmetric) if A ⊤ = − A A^\top = -A A ⊤ = − A (so A i j = − A j i A_{ij}=-A_{ji} A ij = − A j i , forcing A i i = 0 A_{ii}=0 A ii = 0 ).
A ⊤ A A^\top A A ⊤ A is always symmetric (huge in ML)
( A ⊤ A ) ⊤ = A ⊤ ( A ⊤ ) ⊤ = A ⊤ A (A^\top A)^\top = A^\top (A^\top)^\top = A^\top A ( A ⊤ A ) ⊤ = A ⊤ ( A ⊤ ) ⊤ = A ⊤ A . This is why Gram matrices , covariance matrices , and the normal equations A ⊤ A x = A ⊤ b A^\top A x = A^\top b A ⊤ A x = A ⊤ b live in symmetric-matrix land — giving real eigenvalues and orthogonal eigenvectors.
Also: for a vector x x x , x ⊤ x = ∑ i x i 2 = ∥ x ∥ 2 x^\top x = \sum_i x_i^2 = \|x\|^2 x ⊤ x = ∑ i x i 2 = ∥ x ∥ 2 . The transpose turns a column into the machine that computes squared length.
Worked example Verify the reverse-order rule
A = [ 1 2 0 1 ] , B = [ 1 0 3 1 ] A=\begin{bmatrix}1&2\\0&1\end{bmatrix},\; B=\begin{bmatrix}1&0\\3&1\end{bmatrix} A = [ 1 0 2 1 ] , B = [ 1 3 0 1 ] .
A B = [ 7 2 3 1 ] ⇒ ( A B ) ⊤ = [ 7 3 2 1 ] AB = \begin{bmatrix}7&2\\3&1\end{bmatrix}\Rightarrow (AB)^\top=\begin{bmatrix}7&3\\2&1\end{bmatrix} A B = [ 7 3 2 1 ] ⇒ ( A B ) ⊤ = [ 7 2 3 1 ] .
B ⊤ A ⊤ = [ 1 3 0 1 ] [ 1 0 2 1 ] = [ 7 3 2 1 ] B^\top A^\top = \begin{bmatrix}1&3\\0&1\end{bmatrix}\begin{bmatrix}1&0\\2&1\end{bmatrix} = \begin{bmatrix}7&3\\2&1\end{bmatrix} B ⊤ A ⊤ = [ 1 0 3 1 ] [ 1 2 0 1 ] = [ 7 2 3 1 ] . ✓
Why this step? We compute both sides independently and match — confirming the derivation, not assuming it.
Worked example Split a matrix into symmetric + skew
A = [ 2 5 1 4 ] A=\begin{bmatrix}2&5\\1&4\end{bmatrix} A = [ 2 1 5 4 ] . Then A ⊤ = [ 2 1 5 4 ] A^\top=\begin{bmatrix}2&1\\5&4\end{bmatrix} A ⊤ = [ 2 5 1 4 ] .
S = 1 2 ( A + A ⊤ ) = [ 2 3 3 4 ] S=\tfrac12(A+A^\top)=\begin{bmatrix}2&3\\3&4\end{bmatrix} S = 2 1 ( A + A ⊤ ) = [ 2 3 3 4 ] (symmetric ✓), K = 1 2 ( A − A ⊤ ) = [ 0 2 − 2 0 ] K=\tfrac12(A-A^\top)=\begin{bmatrix}0&2\\-2&0\end{bmatrix} K = 2 1 ( A − A ⊤ ) = [ 0 − 2 2 0 ] (skew, zero diagonal ✓).
S + K = [ 2 5 1 4 ] = A S+K = \begin{bmatrix}2&5\\1&4\end{bmatrix}=A S + K = [ 2 1 5 4 ] = A . ✓
Why this step? Averaging picks the part symmetric under the flip; half the difference picks the anti-part.
( A B ) ⊤ = A ⊤ B ⊤ (AB)^\top = A^\top B^\top ( A B ) ⊤ = A ⊤ B ⊤ "
Why it feels right: transpose is linear, so students expect it to "pass through" a product term by term, like it does for a sum.
The fix: a product is not entrywise — it mixes indices via ∑ k A i k B k j \sum_k A_{ik}B_{kj} ∑ k A ik B k j . Shape-matching forces the reversal: ( A B ) ⊤ = B ⊤ A ⊤ (AB)^\top = B^\top A^\top ( A B ) ⊤ = B ⊤ A ⊤ . Sanity-check with rectangular shapes and A ⊤ B ⊤ A^\top B^\top A ⊤ B ⊤ often won't even multiply.
Common mistake "Transpose changes the determinant / eigenvalues."
Why it feels right: A ⊤ A^\top A ⊤ looks like a different matrix, so you assume different numbers.
The fix: det ( A ⊤ ) = det ( A ) \det(A^\top)=\det(A) det ( A ⊤ ) = det ( A ) , and since eigenvalues are roots of det ( A − λ I ) \det(A-\lambda I) det ( A − λ I ) , A A A and A ⊤ A^\top A ⊤ share the same eigenvalues (eigenvectors can differ).
Common mistake "A skew-symmetric matrix can have nonzero diagonal."
Why it feels right: you focus only on off-diagonal sign flips.
The fix: A i i = − A i i ⇒ 2 A i i = 0 ⇒ A i i = 0 A_{ii} = -A_{ii} \Rightarrow 2A_{ii}=0 \Rightarrow A_{ii}=0 A ii = − A ii ⇒ 2 A ii = 0 ⇒ A ii = 0 . Diagonal is always zero.
Recall Feynman: explain to a 12-year-old
Imagine a class seating chart drawn as a grid. Each number says "this kid in row i i i , seat j j j ." The transpose is what you get if you turn the grid on its side so rows become columns — like tilting a photo 90° along its diagonal mirror. The kid who was in "row 3, seat 1" is now in "row 1, seat 3." You didn't add or remove any kids, you just changed how you read the grid. And a cool rule: if you first do task A A A then task B B B and flip the whole thing, it's the same as flipping B B B , then flipping A A A — you have to undo them in reverse order, like taking off your shoes before your socks.
"Flip about the diagonal" — diagonal entries never move.
Reverse rule: "Socks-and-shoes" — ( A B ) ⊤ = B ⊤ A ⊤ (AB)^\top = B^\top A^\top ( A B ) ⊤ = B ⊤ A ⊤ (undo in reverse).
Symmetric factory: A ⊤ A A^\top A A ⊤ A is always symmetric ("A-transpose-A is A-OK / symmetric").
What is the defining entry rule for the transpose? ( A ⊤ ) i j = A j i (A^\top)_{ij} = A_{ji} ( A ⊤ ) ij = A j i — swap the two indices.
How does transpose change the shape of an m × n m\times n m × n matrix? It becomes
n × m n\times m n × m .
State the reverse-order (socks-and-shoes) rule. ( A B ) ⊤ = B ⊤ A ⊤ (AB)^\top = B^\top A^\top ( A B ) ⊤ = B ⊤ A ⊤ .
Derive why ( A B ) ⊤ = B ⊤ A ⊤ (AB)^\top=B^\top A^\top ( A B ) ⊤ = B ⊤ A ⊤ and not A ⊤ B ⊤ A^\top B^\top A ⊤ B ⊤ . ( A B ) i j ⊤ = ∑ k A j k B k i = ∑ k ( B ⊤ ) i k ( A ⊤ ) k j (AB)^\top_{ij}=\sum_k A_{jk}B_{ki}=\sum_k (B^\top)_{ik}(A^\top)_{kj} ( A B ) ij ⊤ = ∑ k A j k B k i = ∑ k ( B ⊤ ) ik ( A ⊤ ) k j ; also shapes force the reversal.
What is ( A ⊤ ) ⊤ (A^\top)^\top ( A ⊤ ) ⊤ ? A A A — transpose is an involution (self-inverse).
When is A A A symmetric? Skew-symmetric? Symmetric:
A ⊤ = A A^\top=A A ⊤ = A . Skew:
A ⊤ = − A A^\top=-A A ⊤ = − A (zero diagonal).
Why is A ⊤ A A^\top A A ⊤ A always symmetric? ( A ⊤ A ) ⊤ = A ⊤ ( A ⊤ ) ⊤ = A ⊤ A (A^\top A)^\top = A^\top(A^\top)^\top = A^\top A ( A ⊤ A ) ⊤ = A ⊤ ( A ⊤ ) ⊤ = A ⊤ A .
How do you split any square A A A into symmetric + skew parts? A = 1 2 ( A + A ⊤ ) + 1 2 ( A − A ⊤ ) A=\tfrac12(A+A^\top)+\tfrac12(A-A^\top) A = 2 1 ( A + A ⊤ ) + 2 1 ( A − A ⊤ ) .
Relationship between det ( A ) \det(A) det ( A ) and det ( A ⊤ ) \det(A^\top) det ( A ⊤ ) ? Equal; hence same characteristic polynomial and eigenvalues.
What is ( A − 1 ) ⊤ (A^{-1})^\top ( A − 1 ) ⊤ ? ( A ⊤ ) − 1 (A^\top)^{-1} ( A ⊤ ) − 1 (proved by transposing
A A − 1 = I AA^{-1}=I A A − 1 = I ).
Inner-product / adjoint property of transpose? ⟨ A x , y ⟩ = ⟨ x , A ⊤ y ⟩ \langle Ax,y\rangle=\langle x,A^\top y\rangle ⟨ A x , y ⟩ = ⟨ x , A ⊤ y ⟩ .
Why must a skew-symmetric matrix have zero diagonal? A i i = − A i i ⇒ A i i = 0 A_{ii}=-A_{ii}\Rightarrow A_{ii}=0 A ii = − A ii ⇒ A ii = 0 .
Reverse-order: (AB)^T = B^T A^T
Inverse: (A^-1)^T = (A^T)^-1
Symmetry and dot products
Intuition Hinglish mein samjho
Dekho, transpose ka funda bilkul simple hai: matrix ko uski main diagonal ke around palat do. Jo rows the woh columns ban jaate hain, aur jo columns the woh rows. Rule sirf ek hai — ( A ⊤ ) i j = A j i (A^\top)_{ij} = A_{ji} ( A ⊤ ) ij = A j i — matlab index i i i aur j j j ko aapas mein swap kar do. Isse shape m × n m\times n m × n ka n × m n\times m n × m ho jaata hai, lekin koi number naya add ya delete nahi hota, sirf padhne ka tareeka badalta hai.
Sabse important property jise students galat karte hain: ( A B ) ⊤ = B ⊤ A ⊤ (AB)^\top = B^\top A^\top ( A B ) ⊤ = B ⊤ A ⊤ , na ki A ⊤ B ⊤ A^\top B^\top A ⊤ B ⊤ . Yaad rakhne ka tareeka — "socks and shoes": pehle shoes utaaro phir socks, order ulta ho jaata hai. Logically bhi, agar A A A hai m × n m\times n m × n aur B B B hai n × p n\times p n × p , to ( A B ) ⊤ (AB)^\top ( A B ) ⊤ hoga p × m p\times m p × m , aur yeh sirf tabhi banega jab B ⊤ B^\top B ⊤ pehle aaye. Shape khud force kar deti hai order ko.
ML mein transpose kyun matter karta hai? Kyunki A ⊤ A A^\top A A ⊤ A hamesha symmetric hota hai — proof: ( A ⊤ A ) ⊤ = A ⊤ A (A^\top A)^\top = A^\top A ( A ⊤ A ) ⊤ = A ⊤ A . Isi wajah se covariance matrix, Gram matrix, aur least-squares ki normal equations A ⊤ A x = A ⊤ b A^\top A x = A^\top b A ⊤ A x = A ⊤ b symmetric world mein aate hain, jahan eigenvalues real hote hain aur eigenvectors orthogonal. PCA, linear regression — sab yahin se aata hai.
Ek aur deep baat: transpose actually dot product ko "doosri taraf" le jaata hai — ⟨ A x , y ⟩ = ⟨ x , A ⊤ y ⟩ \langle Ax, y\rangle = \langle x, A^\top y\rangle ⟨ A x , y ⟩ = ⟨ x , A ⊤ y ⟩ . Yeh transpose ka asli, coordinate-free matlab hai (ise adjoint bolte hain). Bas itna samajh lo to poora chapter khul jaata hai.