Interactive mathematics

Matrix Calculator

Build matrices cell by cell, calculate with clear steps, and see how a two-dimensional matrix transforms a grid.

Thirteen operations · worked steps · visual transformation

Build your matrices

Choose the rows and columns. Type into the cells or paste rows copied from a spreadsheet.

Matrix A

Paste rows

Use new lines for rows and tabs, spaces or semicolons between numbers.

Matrix B

Paste rows

Use new lines for rows and tabs, spaces or semicolons between numbers.

All results

Results are rounded for display; calculations keep full numerical precision.

Add A + B

How it was calculated

    Subtract A − B

    How it was calculated

      Multiply A × B

      How it was calculated

        Inverse of A

        How it was calculated

          Inverse of B

          How it was calculated

            Transpose A

            How it was calculated

              Transpose B

              How it was calculated

                Determinant of A

                How it was calculated

                  Determinant of B

                  How it was calculated

                    Rank of A

                    How it was calculated

                      Rank of B

                      How it was calculated

                        Reduced row echelon form of A

                        How it was calculated

                          Reduced row echelon form of B

                          How it was calculated

                            2D matrix transformation

                            Move the slider to see how the selected matrix transforms the unit square and coordinate grid.

                            Original unit squareTransformed square

                            This picture represents the linear transformation of the selected 2×2 matrix; it does not display addition or multiplication of matrices.

                            Understand matrix operations

                            Addition and subtraction

                            Only matrices of the same size can be added or subtracted. Each answer cell combines the cells in the same position.

                            Matrix multiplication

                            The inner dimensions must match. An answer cell is a row–column dot product, so changing the order can change the result.

                            Inverse and determinant

                            An inverse exists only for a square matrix with a nonzero determinant. A one-by-one matrix can also have an inverse.

                            Rank and row reduction

                            Rank counts independent rows or columns. Reduced row echelon form exposes pivots and helps reveal dependencies.

                            Related mathematics tools

                            Explore equations, vectors and other numerical tools.

                            Frequently asked questions

                            Can I paste a matrix from a spreadsheet?

                            Yes. Copy a rectangular range and paste it into the box for A or B. Tabs and line breaks are recognized.

                            Why does multiplication reject my matrices?

                            The number of columns in A must match the number of rows in B. The answer then has A’s row count and B’s column count.

                            When does an inverse exist?

                            A square matrix is invertible when its determinant is not zero. A one-by-one matrix has inverse 1/a when its entry a is not zero.

                            Why does the transformation picture disappear?

                            The visual guide is only for two-by-two matrices with values that fit a readable coordinate view.

                            What does rank mean?

                            Rank is the number of independent rows or columns, found from the pivot positions of a row-reduced matrix.