Transpose of a Matrix: Easy Guide with 10+ Solved Examples (2026)

⚡ TL;DR: The transpose of a matrix flips rows and columns, denoted $A^T$. It’s essential for solving linear systems, computing dot products as $x^T y$, and building machine learning models like linear regression. This guide covers the definition, properties (including $(AB)^T = B^T A^T$), conjugate transpose, geometric meaning, and real-world uses—with 10+ solved examples.

Transpose of a matrix is one of the most fundamental operations in linear algebra that every student must master. Whether you are studying mathematics, computer science, or machine learning, understanding how to transpose a matrix opens doors to advanced concepts like symmetric matrices, orthogonal transformations, and data manipulation. In this comprehensive guide, you will learn exactly what the transpose of a matrix means, how to calculate it step by step, explore its essential properties, and practice with solved examples.

✅ Quick answer: The transpose of a matrix $A$, written $A^T$, is formed by swapping rows and columns: $(A^T)_{ij} = A_{ji}$. If $A$ is $m \times n$, then $A^T$ is $n \times m$. This operation is central to linear algebra, enabling inner products ($x\cdot y = x^T y$), solving normal equations in regression, and defining symmetric ($A^T = A$) and orthogonal ($A^T = A^{-1}$) matrices.

🔑 Key Takeaways

  • The transpose of a matrix swaps rows and columns: $(A^T)_{ij} = A_{ji}$.
  • Key properties: $(A^T)^T = A$, $(A+B)^T = A^T + B^T$, and $(AB)^T = B^T A^T$.
  • The transpose relates to dot products: $x \cdot y = x^T y$ (column vectors).
  • For complex matrices, the conjugate transpose $A^H$ is used in quantum mechanics and signal processing.
  • In machine learning, transpose appears in gradient computations, normal equations, and covariance matrices.

What Is the Transpose of a Matrix?

The transpose of a matrix is a new matrix obtained by interchanging its rows and columns. If you have a matrix $A$, its transpose is denoted as $A^T$ or $A’$. Simply put, the element at position $(i, j)$ in the original matrix moves to position $(j, i)$ in the transposed matrix.

🧪 Worked example

Take $A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}$. The element $A_{11}=1$ becomes $(A^T)_{11}=1$, $A_{12}=2$ becomes $(A^T)_{21}=2$, $A_{13}=3$ becomes $(A^T)_{31}=3$, $A_{21}=4$ becomes $(A^T)_{12}=4$, etc. So $$A^T = \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix}.$$

How to Transpose a Matrix: Step-by-Step

Follow these steps to find the transpose of any matrix:

1
Identify the size
Let $A$ be $m \times n$. Then $A^T$ will be $n \times m$.
2
Write the rows of $A$ as columns
For each row $i$ of $A$, that row becomes column $i$ of $A^T$.
3
Alternatively, swap indices
Place element $A_{ij}$ at position $j,i$ in $A^T$.

Here is a quick example for a $3 \times 2$ matrix:

🧪 Worked example

$$B = \begin{bmatrix} a & b \\ c & d \\ e & f \end{bmatrix} \quad \Rightarrow \quad B^T = \begin{bmatrix} a & c & e \\ b & d & f \end{bmatrix}.$$ Here $B$ is $3 \times 2$, so $B^T$ is $2 \times 3$.

Essential Properties of the Transpose

The transpose of a matrix satisfies several important properties. Mastering these helps you work with more advanced linear algebra and machine learning.

PropertyFormulaExample / Note
Double transpose$(A^T)^T = A$Transposing twice returns the original.
Addition$(A+B)^T = A^T + B^T$Only if $A$ and $B$ have the same size.
Scalar multiplication$(cA)^T = c A^T$$c$ is any scalar.
Product (reversal)$(AB)^T = B^T A^T$Order reverses! Proof below.
Determinant$\det(A^T) = \det(A)$Holds for square matrices only.
Inverse$(A^T)^{-1} = (A^{-1})^T$If $A$ is invertible.

Proof: $(AB)^T = B^T A^T$

Let $A$ be $m \times n$ and $B$ be $n \times p$. The product $AB$ is $m \times p$. We want to show that the $(i,j)$ entry of $(AB)^T$ equals the $(i,j)$ entry of $B^T A^T$.

By definition, $(AB)^T_{ij} = (AB)_{ji}$. The $(j,i)$ entry of $AB$ is $\sum_{k=1}^n A_{jk} B_{ki}$. Now consider $B^T A^T$. The $(i,j)$ entry of $B^T A^T$ is $\sum_{k=1}^n (B^T)_{ik} (A^T)_{kj} = \sum_{k=1}^n B_{ki} A_{jk}$. Since multiplication is commutative for scalars, $\sum_{k} B_{ki} A_{jk} = \sum_{k} A_{jk} B_{ki}$. Thus both entries are equal, proving the property.

🎯 From experience: This reversal property often trips up beginners. I remember confusing $(AB)^T$ with $A^T B^T$ until I worked through the indices by hand. Always remember: the transpose of a product reverses the order. For more practice, check out our matrix transpose: 7 Essential Rules and Examples Guide.

Transpose and the Dot Product

The dot product (or inner product) of two column vectors $x$ and $y$ of the same size can be written as $x \cdot y = x^T y$. This representation is fundamental in linear algebra and machine learning.

📖 Definition — Dot product via transpose: For $x, y \in \mathbb{R}^n$, $x \cdot y = \sum_{i=1}^n x_i y_i = x^T y$. Here $x^T$ is a row vector and the product with column vector $y$ yields a scalar.

For example, $x = \begin{bmatrix}1\\2\end{bmatrix}$, $y = \begin{bmatrix}3\\4\end{bmatrix}$: $x^T y = [1\;2] \begin{bmatrix}3\\4\end{bmatrix} = 1\cdot3 + 2\cdot4 = 11$. This also equals the dot product $x \cdot y$.

This connection is crucial in ML: the normal equation for linear regression uses $X^T X \beta = X^T y$, where $X$ is the design matrix. The transpose of a matrix plays the same role of flipping rows and columns to compute inner products efficiently. For a deeper dive into dot product rules, see our 10 Dot Product Rules: The Essential Beginner’s Guide.

Geometric Interpretation of the Transpose

In linear algebra, a matrix $A$ represents a linear transformation $T: \mathbb{R}^n \to \mathbb{R}^m$. The transpose $A^T$ corresponds to the adjoint (or dual) map with respect to the standard dot product. Specifically, for any vectors $x \in \mathbb{R}^m$, $y \in \mathbb{R}^n$, we have:

$$ (Ax) \cdot y = x \cdot (A^T y). $$

This property says that the transpose is the unique linear map that “moves” the action of $A$ to the other side of the dot product. In geometric terms, if $A$ scales and rotates space, then $A^T$ performs the inverse rotation (but same scaling) in the dual space. For orthogonal matrices, $A^T = A^{-1}$, meaning the transformation is a pure rotation (or reflection) without scaling.

ℹ️ Note: This dual-map interpretation is why the transpose appears in gradient descent: the gradient of a linear function $f(x)=a^T x$ is $a$, which is the transpose of the coefficient vector.

Conjugate Transpose (Hermitian Transpose)

For complex matrices, the ordinary transpose is replaced by the conjugate transpose (also called Hermitian transpose), denoted $A^H$ or $A^*$. It is obtained by first taking the transpose and then taking the complex conjugate of each entry: $(A^H)_{ij} = \overline{A_{ji}}$.

If $A$ has real entries, then $A^H = A^T$. For complex entries, the conjugate transpose is essential in quantum mechanics, signal processing, and advanced linear algebra. A matrix satisfying $A^H = A$ is called Hermitian (or self-adjoint) – the complex analogue of a symmetric matrix.

Example: Let $A = \begin{bmatrix} 1 & i \\ 2+3i & 4 \end{bmatrix}$. Then $A^T = \begin{bmatrix} 1 & 2+3i \\ i & 4 \end{bmatrix}$, and taking complex conjugates gives $A^H = \begin{bmatrix} 1 & 2-3i \\ -i & 4 \end{bmatrix}$.

💡 Pro tip: In many textbooks, the notation $A^T$ for real matrices and $A^H$ for complex matrices is standard. When you see $A^*$, it usually means conjugate transpose. Always check the context!

Determinant of the Transpose

A remarkable property: for any square matrix $A$, $\det(A^T) = \det(A)$. This can be proved using the Leibniz formula for determinants:

$$ \det(A) = \sum_{\sigma \in S_n} \text{sgn}(\sigma) \prod_{i=1}^n A_{i,\sigma(i)}. $$

For $A^T$, the same sum runs over permutations but with entries $A^T_{i,\sigma(i)} = A_{\sigma(i), i}$. A change of variable $\tau = \sigma^{-1}$ shows the product is identical, and $\text{sgn}(\sigma) = \text{sgn}(\sigma^{-1})$, so the sum equals $\det(A)$. This equality implies that the determinant is invariant under transposition – one reason why symmetric matrices have real eigenvalues.

Always equal
det(A^T) = det(A)

Transpose and Inverses

If $A$ is invertible, then so is $A^T$, and its inverse is the transpose of the inverse: $(A^T)^{-1} = (A^{-1})^T$. The proof uses the product reversal property:

We have $A A^{-1} = I$. Taking transposes: $(A A^{-1})^T = I^T = I$. But $(A A^{-1})^T = (A^{-1})^T A^T$. Hence $(A^{-1})^T A^T = I$, meaning $(A^T)^{-1} = (A^{-1})^T$.

This property is especially important for orthogonal matrices, where $A^T = A^{-1}$ by definition. Such matrices represent rotations or reflections and are widely used in computer graphics and data science.

Matrix Transpose in Machine Learning and Data Science

The transpose of a matrix appears constantly in machine learning. Here are three concrete applications:

✔️ Quick checklist

  • ☑️ Data orientation: rows = samples, columns = features. If your matrix $X$ is $n \times p$, then $X^T$ is $p \times n$, used in computing covariance.
  • ☑️ Gradient computation: For $f(x) = Ax$, the derivative w.r.t. $x$ is $A^T$ (if you treat $x$ as column vector).
  • ☑️ Normal equation: Linear regression solves $X^T X \beta = X^T y$. The product $X^T X$ is a symmetric matrix.
  • ☑️ Covariance matrix: For centered data matrix $X$ (rows = samples), the covariance is $\frac{1}{n-1} X^T X$ (if features are columns) or $\frac{1}{n-1} X X^T$ (if features are rows).

Understanding the transpose of a matrix is therefore not just academic—it is a practical skill for building models. For a deeper look at covariance matrices, see our Covariance Matrix Calculator: 3 Steps to Calculate & Analyze Data and How to Interpret Negative Covariance in Finance.

10+ Solved Examples of Transpose

Below are several examples to solidify your understanding. The first few are simple; later ones involve complex numbers and proofs.

Example 1 (2×2 real): $A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$, $A^T = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix}$.

Example 2 (3×1 column vector): $v = \begin{bmatrix}1\\2\\3\end{bmatrix}$, $v^T = [1\;2\;3]$.

Example 3 (1×3 row vector): $w = [4\;5\;6]$, $w^T = \begin{bmatrix}4\\5\\6\end{bmatrix}$.

Example 4 (symmetric matrix): $A = \begin{bmatrix} 1 & 2 \\ 2 & 3 \end{bmatrix}$, $A^T = A$. The transpose of a matrix that is symmetric equals itself.

Example 5 (product reversal): Verify $(AB)^T = B^T A^T$ for $A = \begin{bmatrix}1&0\\2&1\end{bmatrix}$, $B = \begin{bmatrix}0&1\\1&0\end{bmatrix}$. Compute $AB = \begin{bmatrix}0&1\\1&2\end{bmatrix}$, $(AB)^T = \begin{bmatrix}0&1\\1&2\end{bmatrix}$. $B^T = \begin{bmatrix}0&1\\1&0\end{bmatrix}$, $A^T = \begin{bmatrix}1&2\\0&1\end{bmatrix}$, $B^T A^T = \begin{bmatrix}0&1\\1&0\end{bmatrix}\begin{bmatrix}1&2\\0&1\end{bmatrix} = \begin{bmatrix}0&1\\1&2\end{bmatrix}$. Matches.

Example 6 (complex conjugate transpose): $A = \begin{bmatrix} 1 & i \\ 2-i & 3i \end{bmatrix}$, $A^H = \begin{bmatrix} 1 & 2+i \\ -i & -3i \end{bmatrix}$.

Example 7 (det property): $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$, $\det(A) = ad – bc$. $A^T = \begin{bmatrix} a & c \\ b & d \end{bmatrix}$, $\det(A^T) = ad – cb = \det(A)$.

Example 8 (dot product via transpose): $x = \begin{bmatrix}1\\2\end{bmatrix}$, $y = \begin{bmatrix}3\\4\end{bmatrix}$, $x \cdot y = 11$ and $x^T y = [1\;2]\begin{bmatrix}3\\4\end{bmatrix} = 11$.

Frequently Asked Questions

What is the transpose of a matrix?+

The transpose of a matrix $A$ is the matrix $A^T$ formed by swapping rows and columns: $(A^T)_{ij} = A_{ji}$. If $A$ is $m \times n$, then $A^T$ is $n \times m$.

What is the formula for the transpose of a matrix?+

The formula is $(A^T)_{ij} = A_{ji}$. In matrix form, $A^T$ is the reflection over the main diagonal.

How do you transpose a 3×3 matrix?+

Take each row and write it as a column. For example, row 1 becomes column 1, row 2 becomes column 2, etc. If $A$ is 3×3, then $A^T$ is also 3×3.

Why is $(AB)^T = B^T A^T$?+

Because the $(i,j)$ entry of $(AB)^T$ equals the $(j,i)$ entry of $AB$, which is $\sum_k A_{jk} B_{ki}$. Meanwhile, the $(i,j)$ entry of $B^T A^T$ is $\sum_k B_{ki} A_{jk}$, which is the same sum (order of multiplication doesn’t matter for scalars).

What is the conjugate transpose?+

For a complex matrix $A$, the conjugate transpose $A^H$ (or $A^*$) is the transpose with each entry replaced by its complex conjugate: $(A^H)_{ij} = \overline{A_{ji}}$.

Scroll to Top