Lelifi·tools

Matrix Transpose Calculator

The transpose flips a matrix across its main diagonal, so rows become columns. Enter 1 2 3 and 4 5 6 as two rows and the calculator returns 1 4, 2 5, 3 6, turning a 2 x 3 matrix into a 3 x 2 matrix. Transposing twice returns the original: (A^T)^T = A. Symmetric matrices, covariance tables, and graph adjacency matrices all lean on this one move.

Transpose a matrix

All calculations run in your browser, and nothing you type is uploaded or stored.

Paste a matrix with rows on separate lines and get the transpose instantly, plus the flipped dimensions and a plain English explanation.

By the Lelifi editors ·

Key takeaways

Rows become columns across the main diagonalentry in row i, column j moves to row j, column i123456Original 2 x 3142536Transpose 3 x 21 lands at row 1, column 1 in both, 2 moves to row 2, column 1
The 2 x 3 matrix [[1,2,3],[4,5,6]] transposes to the 3 x 2 matrix [[1,4],[2,5],[3,6]]. Diagonal entries stay put.
Dimensions flip when you transposean m x n matrix always becomes n x mRow vector 1 x 4Column vector 4 x 1Rectangle 2 x 3Rectangle 3 x 2Square 3 x 3Square 3 x 3
A 1 x 4 row vector comes back as a 4 x 1 column vector, and only a square matrix keeps its shape.
On this page
  1. What the transpose of a matrix is
  2. How to use this calculator
  3. Worked example: transposing a 2 x 3 matrix
  4. The rules transposes follow
  5. Symmetric matrices: when A^T equals A
  6. Where matrix transposes show up
  7. Common mistakes and how to check them
  8. Doing a transpose by hand

What the transpose of a matrix is

A matrix is a grid of numbers arranged in rows and columns, and the transpose is the same grid flipped across its main diagonal, the line that runs from the top left corner down to the bottom right. Every entry in row i, column j moves to row j, column i. Rows become columns, columns become rows, and the entries on the diagonal stay where they are. The transpose of a matrix A is written A^T, and the Wolfram MathWorld transpose entry gives the same definition in formal notation.

A 2 x 3 matrix has 2 rows and 3 columns, so its transpose has 3 rows and 2 columns. The shape always flips: an m x n matrix becomes n x m. Nothing is calculated, scaled, or changed in value; transposing rearranges positions only. That makes it one of the cheapest operations in linear algebra and one of the most common, showing up in statistics packages, 3D graphics engines, and machine learning code that runs billions of transposes a day.

How to use this calculator

Type your matrix in the box with one row per line. Separate the entries inside a row with spaces or commas, whichever you prefer. Semicolons work as row separators too, if you like writing matrices on a single line the way textbooks do: 1 2 3; 4 5 6 is the same as two lines.

The result shows the transposed matrix and both dimensions, so you can confirm the flip: a 2 x 3 input reports a 3 x 2 output. Decimals and negative numbers are fine. If a row has a different length than the others, the calculator tells you which row is the problem instead of guessing at a shape. All calculations run in your browser, and nothing you type is uploaded or stored.

Worked example: transposing a 2 x 3 matrix

Take the matrix with row 1 equal to 1, 2, 3 and row 2 equal to 4, 5, 6. It has 2 rows and 3 columns, so it is a 2 x 3 matrix. Row 1 becomes column 1 and row 2 becomes column 2. Read the result column by column and you get rows of 1 and 4, then 2 and 5, then 3 and 6, which is a 3 x 2 matrix.

Original (2 x 3)Transpose (3 x 2)
Row 1: 1, 2, 3Row 1: 1, 4
Row 2: 4, 5, 6Row 2: 2, 5
Row 3: 3, 6

The entry level view shows the same move one cell at a time:

EntryIn the originalIn the transpose
1row 1, column 1row 1, column 1
2row 1, column 2row 2, column 1
3row 1, column 3row 3, column 1
4row 2, column 1row 1, column 2
6row 2, column 3row 3, column 2

Check it in the calculator: type 1 2 3 on the first line and 4 5 6 on the second, and the output lists 1 4, then 2 5, then 3 6, with the dimension line reading 2 x 3 becomes 3 x 2.

The rules transposes follow

Three rules cover most of the algebra. First, transposing twice returns the original matrix: (A^T)^T = A. Flipping rows into columns and then back again undoes itself, the way a double reflection lands where it started.

Second, the transpose of a sum is the sum of the transposes: (A + B)^T = A^T + B^T. Each pair of entries adds the same way before or after the flip, so the order never matters for plus.

Third, and the rule people forget: the transpose of a product reverses the order, (AB)^T = B^T A^T. A quick numeric check shows why the order matters. Let A = [[1, 2], [0, 1]] and B = [[3, 0], [1, 4]]. Then AB = [[5, 8], [1, 4]], so (AB)^T = [[5, 1], [8, 4]]. Transposing each matrix first gives A^T = [[1, 0], [2, 1]] and B^T = [[3, 1], [0, 4]], and multiplying B^T A^T gives [[5, 1], [8, 4]], which matches. Multiply in the original order instead, A^T B^T, and you get [[3, 1], [6, 6]], a different matrix entirely. The MIT 18.06 linear algebra lecture on transposes works through the same rules, including why the product order reverses.

Symmetric matrices: when A^T equals A

A matrix that equals its own transpose is called symmetric. The entries above the diagonal mirror the entries below it, like [[2, 5], [5, 8]]: the 5 in row 1, column 2 matches the 5 in row 2, column 1. Symmetric matrices are always square, because a rectangular matrix cannot match its own flipped shape.

They appear everywhere. A covariance matrix of measured variables is symmetric. A distance table between cities is symmetric, because the trip is the same in both directions. The adjacency matrix of an undirected graph is symmetric, since an edge connects both of its ends at once. Linear algebra adds a bonus fact: for any matrix R, the product R^T R is symmetric, which is exactly why that product appears all over least squares fitting and statistics. If you transpose a matrix and get the same thing back, you are probably looking at one of these structures.

Where matrix transposes show up

The transpose earns its keep in applied fields, not just homework. Statisticians use it to compress thousands of data rows into a small symmetric matrix, network analysts use it to describe two way connections, and graphics programmers use it to reorient coordinate frames.

FieldWhat gets transposedWhy
StatisticsA data matrix X with n rows and k columnsX^T X builds the covariance and correlation structure between the k variables
Graphs and networksAn adjacency matrixUndirected edges make A equal A^T, a quick symmetry test
Computer graphicsBasis and rotation dataDot products against rows behave like multiplying by the transpose
Machine learningWeight and data matricesGradient updates and layer shapes depend on transposed views
SpreadsheetsA pasted tableThe transpose paste swaps rows and columns in one step

The covariance case is the classic. Put n observations of k variables into an n x k matrix X, center each column, and the covariance matrix comes from X^T X, a k x k symmetric matrix. The transpose is what turns measurements spread across many rows into comparisons between a handful of variables.

Common mistakes and how to check them

The fastest check is the dimension line. If you started with m rows and n columns, the answer must have n rows and m columns. If the output shape does not flip, something went wrong before the math even started.

Input shapeTranspose shape
1 x 4 (row vector)4 x 1 (column vector)
3 x 1 (column vector)1 x 3 (row vector)
2 x 33 x 2
3 x 3 (square)3 x 3, same size

Other traps worth naming. Confusing the transpose with the inverse: the inverse solves equations and multiplies to the identity, while the transpose only rearranges entries. Mixing up separators when typing: this calculator takes new lines or semicolons between rows and spaces or commas between entries. Pasting column headers along with the numbers, which makes the first row non numeric. And expecting the value of the determinant to change: it does not, because det(A^T) = det(A) for every square matrix, so a moved determinant means the error is somewhere else.

Doing a transpose by hand

For small matrices a pencil beats any tool. Draw a blank grid with the same number of columns as your original has rows. Then read the original down its columns instead of across its rows: the first column of A, read top to bottom, becomes the first row of A^T, read left to right. Repeat for the second column, then the third, until the grid is full.

Two habits catch most errors. Circle the diagonal entries first, since they do not move. Then swap only the upper triangle with the lower triangle, entry for entry. In a 3 x 3 that is three swaps: the (1,2) entry trades with (2,1), the (1,3) with (3,1), and the (2,3) with (3,2). Finish by transposing your answer a second time. If the original matrix comes back, the job is right, which is the (A^T)^T = A rule from earlier in action. For anything larger than about 4 x 4, let the calculator do the shuffling and use the dimension check to confirm it.

Frequently asked questions

What is the transpose of a matrix?

The matrix with rows and columns swapped: the entry in row i, column j moves to row j, column i. It is written A^T.

How do I transpose a 2 x 3 matrix?

The matrix [[1, 2, 3], [4, 5, 6]] becomes [[1, 4], [2, 5], [3, 6]]. Row 1 becomes column 1 and row 2 becomes column 2.

What does an m x n matrix become after transposing?

An n x m matrix. The dimensions flip: 2 x 3 turns into 3 x 2, and a 1 x 5 row turns into a 5 x 1 column.

Is the transpose of a square matrix the same size?

Yes. A 3 x 3 matrix transposes to another 3 x 3 matrix; only the off diagonal entries trade places.

Is A^T the same as the inverse of A?

No. The transpose rearranges entries, while the inverse is the matrix that multiplies A into the identity. They are different operations that only coincide for special matrices.

What is a symmetric matrix?

One that equals its own transpose, like [[2, 5], [5, 8]]. Symmetric matrices are always square, and their entries mirror across the diagonal.

What is (AB)^T?

B^T A^T: the transpose of a product is the product of the transposes in reverse order. With A = [[1, 2], [0, 1]] and B = [[3, 0], [1, 4]], (AB)^T = [[5, 1], [8, 4]].

Does transposing change the determinant?

No. det(A^T) = det(A) for every square matrix, which makes the determinant a handy sanity check after a transpose.

How do I enter a matrix in the calculator?

Put one row per line and separate entries with spaces or commas. Semicolons can also separate rows on a single line, like 1 2; 3 4.

What if my rows have different lengths?

The calculator reports which row is off instead of returning a broken shape. Pad the short row or remove the extra entry, then transpose again.

What is the transpose of a row vector?

A column vector. A 1 x 3 row such as 7, 8, 9 becomes a 3 x 1 column with 7, 8, 9 stacked downward.

Why does the covariance formula use a transpose?

For a centered data matrix X, the product X^T X collects how each pair of variables moves together, producing a small symmetric k x k matrix no matter how many data rows you have.

Can I transpose a matrix with negative or decimal entries?

Yes. Transposing moves positions only, so signs and values never change. An entry of -2.5 moves exactly like an entry of 2.

Does transposing a 1 x 1 matrix do anything?

No. A single number is its own transpose, and the same goes for the diagonal entries of any matrix.

Spotted a wrong number or a broken result?

More Math tools

See all Math tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.