Ekuation

Math

Matrix Calculator

A comprehensive matrix calculator that supports 11 operations on matrices of up to 10x10. Enter one or two matrices, choose an operation, and see the result instantly. Supports addition, subtraction, multiplication, scalar multiplication, transpose, determinant, inverse, reduced row echelon form (RREF), rank, trace, and eigenvalue computation. Results include matrix properties and formatted output.

Number of rows in matrix A.

Number of columns in matrix A.

Number of rows in matrix B.

Number of columns in matrix B.

Matrix Calculator Tips

Click to show tips

Try an Example

Pick a scenario to see how the calculator works, then adjust the values

Add Two Matrices

Add two 2x2 matrices element-wise.

Key values: 2x2 matrices · A + B · Addition

Matrix Multiplication

Multiply a 2x3 matrix by a 3x2 matrix to get a 2x2 result.

Key values: 2x3 times 3x2 · A times B · Multiplication

3x3 Determinant

Compute the determinant of a 3x3 matrix.

Key values: 3x3 matrix · det(A) · Determinant

Matrix Inverse

Compute the inverse of a 2x2 matrix.

Key values: 2x2 matrix · A⁻¹ · Inverse

Documentation

About This Calculator

Matrices are rectangular arrays of numbers that are central to linear algebra, computer science, engineering, and data science. This calculator supports 11 operations on matrices up to 10×1010 \times 10, covering everything from basic arithmetic to eigenvalue computation.

Enter your matrix entries, select an operation, and get instant results along with properties of the input matrix such as whether it is square, symmetric, singular, diagonal, or the identity.


Key Formulas

Matrix Addition

For two m×nm \times n matrices AA and BB, the sum is computed element-wise:

(A+B)ij=aij+bij(A + B)_{ij} = a_{ij} + b_{ij}

Matrix Multiplication

For an m×nm \times n matrix AA and an n×pn \times p matrix BB, the product is an m×pm \times p matrix:

(AB)ij=k=1naikbkj(AB)_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj}

Determinant (2x2)

det(abcd)=adbc\det \begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc

Determinant (3x3, Sarrus Rule)

det(A)=a(eifh)b(difg)+c(dheg)\det(A) = a(ei - fh) - b(di - fg) + c(dh - eg)

Matrix Inverse (2x2)

A1=1adbc(dbca)A^{-1} = \frac{1}{ad - bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

Eigenvalue Equation

The eigenvalues λ\lambda of a matrix AA satisfy:

det(AλI)=0\det(A - \lambda I) = 0

Trace

tr(A)=i=1naii\operatorname{tr}(A) = \sum_{i=1}^{n} a_{ii}

Worked Examples

Example 1: Matrix Addition

Add two 2x2 matrices:

(1234)+(5678)=(681012)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} + \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} = \begin{pmatrix} 6 & 8 \\ 10 & 12 \end{pmatrix}

Example 2: Matrix Multiplication

Multiply a 2x2 matrix by a 2x2 matrix:

(1234)(5678)=(19224350)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} = \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix}

Example 3: Determinant

Find the determinant of a 3x3 matrix:

det(611425287)=6(1440)1(2810)+1(32+4)=306\det \begin{pmatrix} 6 & 1 & 1 \\ 4 & -2 & 5 \\ 2 & 8 & 7 \end{pmatrix} = 6(-14-40) - 1(28-10) + 1(32+4) = -306

Example 4: Inverse of a 2x2 Matrix

(4726)1=110(6724)=(0.60.70.20.4)\begin{pmatrix} 4 & 7 \\ 2 & 6 \end{pmatrix}^{-1} = \frac{1}{10} \begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix} = \begin{pmatrix} 0.6 & -0.7 \\ -0.2 & 0.4 \end{pmatrix}

Tips & Common Mistakes

  • Multiplication order matters. In general, ABBAAB \neq BA. Always check dimensions before multiplying.
  • Invertibility check. Before computing the inverse, ensure the determinant is nonzero. A singular matrix (det = 0) has no inverse.
  • RREF is unique. No matter which sequence of row operations you perform, the RREF of a matrix is always the same.
  • Trace and eigenvalues. The trace of a matrix equals the sum of its eigenvalues, and the determinant equals the product of its eigenvalues.
  • Floating-point precision. Very small values near zero may appear due to floating-point arithmetic. Values smaller than 10^(-10) are treated as zero.

Frequently Asked Questions

What is a matrix?

A matrix is a rectangular array of numbers arranged in rows and columns. It is a fundamental object in linear algebra used to represent systems of linear equations, linear transformations, and much more.

Why is matrix multiplication not commutative?

Matrix multiplication is not commutative because A times B and B times A may involve different dimensions or different element-wise sums. Even when both products are defined and have the same dimensions, the results are generally different because the order of row-column dot products changes.

When is a matrix invertible?

A square matrix is invertible (non-singular) if and only if its determinant is nonzero. Equivalently, the matrix must have full rank, meaning all its rows (or columns) are linearly independent.

What is Reduced Row Echelon Form (RREF)?

RREF is a standardized form of a matrix obtained through Gauss-Jordan elimination. In RREF, each leading entry is 1, each leading 1 is the only nonzero entry in its column, and leading 1s move strictly to the right as you go down. RREF is unique for any given matrix.

What are eigenvalues and eigenvectors?

For a square matrix A, an eigenvalue lambda is a scalar such that Av = lambda v for some nonzero vector v (the eigenvector). Eigenvalues reveal fundamental properties of a transformation: they tell you which directions are scaled and by how much.

Can I compute eigenvalues for non-square matrices?

Eigenvalues are only defined for square matrices. For non-square matrices, you can compute singular values via Singular Value Decomposition (SVD), which generalizes the concept.


Disclaimer

This calculator is designed for educational and reference purposes. While the underlying algorithms follow standard linear algebra definitions and are validated against established mathematical libraries, results may be subject to floating-point precision limitations for very large or ill-conditioned matrices. Always verify critical results independently.

Related Calculators

6 Calculators

More Math calculators

Calculator Search

Search and find calculators