How to transpose a matrix
Enter a square or rectangular matrix
Choose one to three rows and one to three columns, then type every entry in Matrix A. A transpose works for square matrices, row matrices, column matrices, and rectangular matrices, so the row and column counts do not need to match. Use 0 for a zero entry and a period for a decimal. Negative values keep their signs.
The grid is read left to right across each row. A value at row i, column j is written aᵢⱼ. When you resize, positions that still exist are preserved and newly exposed cells are blank. Any previous result is removed immediately so a transpose from the old shape cannot remain next to new input. Clear A empties this matrix and result state while keeping the current dimensions.
Swap rows with columns
Transposing does not perform arithmetic on the entries. It changes each position from aᵢⱼ to aᵀⱼᵢ. The first row of A becomes the first column of Aᵀ, the second row becomes the second column, and so forth. Therefore an r × c input always produces a c × r result. A 2 × 3 matrix becomes 3 × 2, while a 3 × 3 matrix stays 3 × 3.
The main diagonal of a square matrix remains in place because positions such as (1,1) and (2,2) swap with themselves. Off-diagonal entries exchange positions across that diagonal. For a row matrix such as [[1, 2, 3]], the transpose is a three-row column matrix. Applying transpose twice returns the original matrix: (Aᵀ)ᵀ = A.
Use and verify the transposed result
Check one corner before copying: the top-right entry of A should become the bottom-left entry of Aᵀ. For a rectangular matrix, also confirm that the result dimensions are reversed. Since no values are added or multiplied, every input value should appear exactly once in the result. Those checks catch skipped cells and mistaken row reading.
Transposes are used when data must change orientation, when column vectors are needed from row data, and when formulas use Aᵀ in dot products or covariance calculations. The copied result is plain bracketed rows. The tool performs only the transpose and does not interpret headings, units, or real-world meaning, so keep any labels with your source data when you paste the result elsewhere.
Worked examples
Transpose a 2 × 3 matrix
For A = [[1, 2, 3], [4, 5, 6]], the first row becomes the first entries of three result rows and the second row becomes their second entries. Aᵀ = [[1, 4], [2, 5], [3, 6]], so the 2 × 3 shape becomes 3 × 2.
Transpose a square matrix
For A = [[2, -1], [0, 5]], the diagonal values 2 and 5 remain in place, while -1 and 0 exchange positions. The result is [[2, 0], [-1, 5]]. Transposing that result again restores A.
Limits and troubleshooting
Supported input and output
The supported range is one to three rows and one to three columns. Entries must be ordinary finite numbers. Fraction text, variables, complex numbers, formulas, pasted CSV, and arbitrary-size matrices are outside this focused page.
Displayed entries use at most two decimal places, though a transpose itself does not change numeric values internally. Copy result writes the displayed bracketed rows. It does not download a spreadsheet or preserve column headings.
Fixing common input problems
A blank cell is not assumed to be zero, because silently filling missing data can change the meaning of a matrix. Type 0 explicitly. If a value contains a comma, fraction slash, or letter, replace it with a decimal number such as -0.5.
This calculator does not compute an inverse, determinant, rank, RREF, or matrix product. A transpose is defined for nonsquare matrices; if you need a scalar property of a square matrix, use the determinant page instead.
Frequently asked questions
Can a nonsquare matrix be transposed?
Yes. Any rectangular matrix can be transposed. Its row and column counts simply exchange places, so 2 × 3 becomes 3 × 2.
Does transposing change the numbers?
No. Each number moves to the mirrored row-and-column position. No addition, multiplication, rounding step, or sign change is part of the transpose operation.
What happens to the main diagonal?
Diagonal entries of a square matrix remain in the same positions. Entries on opposite sides of the diagonal exchange positions.
Why did resizing remove my result?
The transpose shape and positions depend on the input dimensions. The old result is cleared immediately so it is never presented as an answer to a resized matrix.
Is transpose the same as inverse?
No. Transpose swaps row and column positions and exists for every matrix. An inverse is a different operation available only for certain square matrices and is outside this page.