Matrix Transpose Calculator
Find the transpose of a matrix by interchanging its rows and columns. The transpose of an m × n matrix has dimensions n × m and is widely used in matrix algebra, symmetry analysis, and linear algebra.
A
Learn About Matrix Transpose
Definition and Index Swapping
The transpose of a matrix $\mathbf{A}$, denoted $\mathbf{A}^T$ (or $\mathbf{A}'$), is formed by interchanging its rows and columns. If $\mathbf{A}$ is an $m \times n$ matrix with entries $a_{ij}$, its transpose $\mathbf{A}^T$ is an $n \times m$ matrix whose entries satisfy:
Geometrically, transposition reflects the matrix entries across the main diagonal ($a_{11}, a_{22}, \dots$). The $i$-th row of $\mathbf{A}$ becomes the $i$-th column of $\mathbf{A}^T$, and dimensions flip from $m \times n$ to $n \times m$.
Fundamental Transposition Properties
- Double Transpose (Involution): $(\mathbf{A}^T)^T = \mathbf{A}$
- Sum Rule: $(\mathbf{A} + \mathbf{B})^T = \mathbf{A}^T + \mathbf{B}^T$
- Scalar Multiple: $(c\mathbf{A})^T = c\mathbf{A}^T$
- Product Reversal: $(\mathbf{A}\mathbf{B})^T = \mathbf{B}^T \mathbf{A}^T$ (the order of matrix multiplication reverses)
- Determinant Invariance: $\det(\mathbf{A}^T) = \det(\mathbf{A})$ (for square matrices)
- Trace Invariance: $\operatorname{tr}(\mathbf{A}^T) = \operatorname{tr}(\mathbf{A})$ (for square matrices)
- Inverse Commutation: $(\mathbf{A}^T)^{-1} = (\mathbf{A}^{-1})^T$ (for invertible matrices)
Matrix Symmetry Classifications
Transposition defines key structural classes of square matrices:
- Symmetric Matrix: $\mathbf{A}^T = \mathbf{A}$ (entries satisfy $a_{ij} = a_{ji}$)
- Skew-Symmetric (Antisymmetric): $\mathbf{A}^T = -\mathbf{A}$ (requires diagonal entries $a_{ii} = 0$)
- Orthogonal Matrix: $\mathbf{A}^T = \mathbf{A}^{-1} \implies \mathbf{A}^T \mathbf{A} = \mathbf{A}\mathbf{A}^T = \mathbf{I}$
Worked Numerical Example
Find the transpose of the $2 \times 3$ matrix $\mathbf{A} = \begin{bmatrix} 1 & -4 & \frac{2}{3} \\ 7 & 0 & 5 \end{bmatrix}$:
- Row 1 becomes Column 1: $\begin{bmatrix} 1 \\ -4 \\ \frac{2}{3} \end{bmatrix}$
- Row 2 becomes Column 2: $\begin{bmatrix} 7 \\ 0 \\ 5 \end{bmatrix}$
Combine into the resulting $3 \times 2$ matrix:
1. Why does the order reverse in the transpose of a product: $(\mathbf{A}\mathbf{B})^T = \mathbf{B}^T\mathbf{A}^T$?
If $\mathbf{A}$ is $m \times p$ and $\mathbf{B}$ is $p \times n$, their product $\mathbf{A}\mathbf{B}$ is $m \times n$, so $(\mathbf{A}\mathbf{B})^T$ must be $n \times m$. Multiplying $\mathbf{A}^T_{(p \times m)} \mathbf{B}^T_{(n \times p)}$ is undefined because the inner dimensions ($m \ne n$) do not match. Only $\mathbf{B}^T_{(n \times p)} \mathbf{A}^T_{(p \times m)}$ is dimensionally valid and yields the required $n \times m$ dot products.
2. Can a non-square matrix be symmetric?
No. Symmetry strictly requires $\mathbf{A}^T = \mathbf{A}$. Because transposition flips dimensions from $m \times n$ to $n \times m$, a matrix can only equal its transpose if $m = n$.
3. What is the difference between a transpose and a conjugate transpose?
For real matrices, they are identical. For complex matrices, the transpose $\mathbf{A}^T$ swaps indices without altering complex values ($[\mathbf{A}^T]_{ij} = a_{ji}$), while the conjugate transpose (Hermitian adjoint $\mathbf{A}^* = \bar{\mathbf{A}}^T$) swaps indices and conjugates complex numbers ($[\mathbf{A}^*]_{ij} = \bar{a}_{ji}$).
1. The Gram Matrix $\mathbf{A}^T\mathbf{A}$ in Statistics and Least Squares
For any real rectangular data matrix $\mathbf{A} \in \mathbb{R}^{m \times n}$, multiplying by its transpose produces two square symmetric matrices: $\mathbf{A}^T \mathbf{A}$ ($n \times n$) and $\mathbf{A} \mathbf{A}^T$ ($m \times m$). In linear regression and machine learning, $\mathbf{A}^T \mathbf{A}$ is the Gram matrix of normal equations, guaranteed to be symmetric and positive semi-definite, forming the core of the least-squares formula $\hat{\mathbf{x}} = (\mathbf{A}^T\mathbf{A})^{-1}\mathbf{A}^T\mathbf{b}$.
2. Transposition is an Anti-Automorphism
In abstract algebra, transposition is an anti-automorphism of the matrix ring $\mathcal{M}_n(\mathbb{R})$. It preserves matrix addition and scalar scaling while inverting the orientation of multiplication ($(\mathbf{A}\mathbf{B})^T = \mathbf{B}^T \mathbf{A}^T$).