What the Transpose Does
A matrix organizes numbers by rows and columns. The transpose changes that arrangement: each row of the original becomes a column, and each column becomes a row. The entries themselves do not change; their positions do. This operation applies to rectangular matrices just as it does to square ones, so keeping track of the dimensions is part of computing a transpose correctly.
Suppose \(\mathbf{A}\) has \(m\) rows and \(n\) columns, so \(\mathbf{A}\in\mathbb{R}^{m\times n}\). Its entry in row \(i\), column \(j\) is \(a_{ij}\), where \(1\le i\le m\) and \(1\le j\le n\). The first index records the row and the second records the column. In the transpose, these two positions are exchanged.
The reversed indices are the main rule: an entry originally indexed \(i,j\) appears at position \(j,i\) after transposing. The ranges also reverse roles. The old column index \(j\), which ran from \(1\) to \(n\), becomes the new row index; the old row index \(i\), which ran from \(1\) to \(m\), becomes the new column index. That is why an \(m\times n\) matrix becomes an \(n\times m\) matrix.
Transposing a Rectangular Matrix
Worked Example: A Two-by-Three Matrix
Find the transpose of \(\mathbf{A}=\begin{bmatrix}1&-2&0\\4&3&5\end{bmatrix}\), and verify its dimensions and entries.
The original matrix has \(2\) rows and \(3\) columns, so its transpose must have \(3\) rows and \(2\) columns. The first row of \(\mathbf{A}\), \((1,-2,0)\), becomes the first column of \(\mathbf{A}^{\top}\). The second row, \((4,3,5)\), becomes the second column:
For an entry-by-entry check, \(a_{11}=1\) appears as \((\mathbf{A}^{\top})_{11}=1\), and \(a_{12}=-2\) appears as \((\mathbf{A}^{\top})_{21}=-2\). The rest follow the same index swap: \(a_{13}=0\) appears at position \((3,1)\), \(a_{21}=4\) at \((1,2)\), \(a_{22}=3\) at \((2,2)\), and \(a_{23}=5\) at \((3,2)\). These are exactly the six entries displayed, and the result has the required \(3\times2\) dimensions.
For a rectangular matrix, the change in shape is especially visible. The transpose is not obtained by changing the number of entries or by adding zeros; it keeps every entry and relocates it. One reliable procedure is to write each original row as a row in the answer’s column direction, then check that the resulting number of rows and columns has reversed.
An \(m\times n\) matrix has \(m\) rows and \(n\) columns.
Move the entry \(a_{ij}\) to position \((j,i)\).
The result must have \(n\) rows and \(m\) columns.
Square Matrices and Vectors
When \(\mathbf{A}\) is square, the transpose has the same overall dimensions as \(\mathbf{A}\), but that does not mean the entries stay in place. Entries away from the main diagonal exchange positions in pairs: the entry in row \(i\), column \(j\) moves to row \(j\), column \(i\). Entries on the main diagonal have \(i=j\), so their positions are unchanged.
Worked Example: A Three-by-Three Matrix
Find the transpose of \(\mathbf{B}=\begin{bmatrix}2&-1&4\\0&3&7\\5&6&-2\end{bmatrix}\), showing how the rows determine the columns.
The first row of \(\mathbf{B}\), \((2,-1,4)\), becomes the first column of \(\mathbf{B}^{\top}\). Its second row, \((0,3,7)\), becomes the second column, and its third row, \((5,6,-2)\), becomes the third column. Therefore
Check several positions using the defining indices: \(b_{12}=-1\) is now at \((2,1)\), \(b_{31}=5\) is now at \((1,3)\), and \(b_{23}=7\) is now at \((3,2)\). The diagonal entries \(b_{11}=2\), \(b_{22}=3\), and \(b_{33}=-2\) remain at their original positions. The result is still \(3\times3\), as required, and each displayed entry is the original entry with its two indices exchanged.
A row matrix has one row, while a column matrix has one column. The transpose exchanges these shapes: a \(1\times n\) row becomes an \(n\times1\) column, and an \(n\times1\) column becomes a \(1\times n\) row. This follows directly from reversing the dimensions and indices, not from a separate rule.
Worked Example: Transposing a Row and a Column
Transpose the row matrix \(\mathbf{r}=\begin{bmatrix}3&-1&2&0\end{bmatrix}\), then transpose the column matrix \(\mathbf{c}=\begin{bmatrix}4\\-2\\5\end{bmatrix}\).
The row matrix has shape \(1\times4\), so \(\mathbf{r}^{\top}\) has shape \(4\times1\). Each of its four entries keeps its value and becomes a separate row-position entry in the column:
For the second matrix, \(\mathbf{c}\) has shape \(3\times1\), so its transpose has shape \(1\times3\). Its entries \(c_{11}=4\), \(c_{21}=-2\), and \(c_{31}=5\) move respectively to positions \((1,1)\), \((1,2)\), and \((1,3)\):
Check: the first result has four rows and one column and contains \(3,-1,2,0\) in order. The second has one row and three columns and contains \(4,-2,5\) in order. In both cases, the entry rule \((\mathbf{A}^{\top})_{ij}=a_{ji}\) gives the positions shown.
Two Consequences of the Definition
Proof. By definition, \((\mathbf{A}^{\top})_{ij}=a_{ji}\), where \(1\le i\le n\) and \(1\le j\le m\). Thus \(\mathbf{A}^{\top}\) has \(n\) permitted row indices and \(m\) permitted column indices, so its dimensions are \(n\times m\). Fix an original row index \(k\). The entries of row \(k\) of \(\mathbf{A}\) are \(a_{k1},\ldots,a_{kn}\). For each \(j\) from \(1\) to \(n\), the entry in row \(j\), column \(k\) of \(\mathbf{A}^{\top}\) is \((\mathbf{A}^{\top})_{jk}=a_{kj}\). These entries, in order, form column \(k\) of \(\mathbf{A}^{\top}\). Fix instead an original column index \(k\). Its entries are \(a_{1k},\ldots,a_{mk}\), and \((\mathbf{A}^{\top})_{ki}=a_{ik}\) for \(i=1,\ldots,m\). These form row \(k\) of \(\mathbf{A}^{\top}\). Therefore rows and columns correspond as stated. \(\square\)
Proof. The first transpose has dimensions \(n\times m\), so its transpose has dimensions \(m\times n\), the same as \(\mathbf{A}\). For any permitted indices \(i,j\), the defining rule applied to \(\mathbf{A}^{\top}\) gives \(((\mathbf{A}^{\top})^{\top})_{ij}=(\mathbf{A}^{\top})_{ji}\). Applying the defining rule to the right-hand entry gives \((\mathbf{A}^{\top})_{ji}=a_{ij}\). Thus \((\mathbf{A}^{\top})^{\top}\) and \(\mathbf{A}\) have the same dimensions and the same entry in every position. By the definition of matrix equality, they are equal. \(\square\)
This second result provides a useful check: if a proposed transpose is transposed again, every entry should return to its original position. The theorem is also valid for rectangular matrices. The first transpose changes \(m\times n\) to \(n\times m\), and the second changes \(n\times m\) back to \(m\times n\).
Common Mistakes and a Reliable Check
Common mistake: reversing the shape but not the entries. Consider \(\mathbf{A}=\begin{bmatrix}1&2&3\\4&5&6\end{bmatrix}\), which has shape \(2\times3\). A wrong calculation is \(\begin{bmatrix}1&2\\3&4\\5&6\end{bmatrix}\). Although this wrong answer has the required \(3\times2\) shape and uses the same six numbers, it does not exchange rows and columns correctly: the original entry \(a_{12}=2\) should move to position \((2,1)\), but the wrong answer puts \(2\) at \((1,2)\).
The correction is to make each original row a column, preserving the order within that row:
Now \(a_{12}=2\) is at position \((2,1)\), \(a_{13}=3\) is at position \((3,1)\), and \(a_{21}=4\) is at position \((1,2)\). All six entries have moved according to the index swap. Checking only the final dimensions is not enough: the entry positions must also be correct.
Another frequent source of errors is confusing a matrix’s dimensions with its entries. A \(2\times3\) matrix does not become \(3\times2\) by changing values; its new row index comes from the old column index, and its new column index comes from the old row index. Before accepting a result, check both facts:
- The dimensions have reversed.
- For every original entry \(a_{ij}\), the result has that entry at position \((j,i)\).
These checks work for square matrices too. Equal dimensions can make an incorrect answer look plausible, so tracing at least one off-diagonal entry is particularly useful for a square example.
Check Your Understanding
For each question, use the entry rule as well as the dimensions to check your answer.
- Find the transpose of \(\begin{bmatrix}2&0&-3\\1&4&5\end{bmatrix}\). What are its dimensions?
- Find the transpose of \(\begin{bmatrix}1&7\\-2&3\end{bmatrix}\), and identify where the original entry in row \(1\), column \(2\) appears.
- Write the transpose of \(\begin{bmatrix}-1&0&6&2\end{bmatrix}\) and state its dimensions.
- If \(\mathbf{A}\) has dimensions \(4\times2\), what are the dimensions of \(\mathbf{A}^{\top}\) and \((\mathbf{A}^{\top})^{\top}\)?
- In one sentence, explain why the \(3\times2\) matrix \(\begin{bmatrix}1&2\\3&4\\5&6\end{bmatrix}\) is not the transpose of \(\begin{bmatrix}1&2&3\\4&5&6\end{bmatrix}\).