Free Calculator Online LogoFree Calculator Online

Matrix Calculator

Perform various matrix operations with our easy-to-use matrix calculator. Add, subtract, multiply matrices or find transpose, determinant, and inverse with just a few clicks.

Matrix A

Matrix B

Operation

What is a Matrix?

A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. Matrices are used in various fields of mathematics, science, and engineering to represent linear transformations, solve systems of linear equations, and model real-world problems.

Matrix Operations

Our calculator supports the following matrix operations:

  • Addition: Matrices of the same dimensions can be added by adding corresponding elements.
  • Subtraction: Similar to addition, but corresponding elements are subtracted.
  • Multiplication: Multiplies two matrices if the number of columns in the first equals the number of rows in the second.
  • Determinant: Calculates the determinant of a square matrix, a single number that encodes certain properties of the matrix.
  • Inverse: Finds the inverse of a square matrix, if it exists (determinant is non-zero).
  • Transpose: Flips a matrix over its diagonal, switching rows and columns.

How to Use the Matrix Calculator

  1. Set the dimensions for Matrix A and Matrix B using the row and column inputs.
  2. Enter the values for each element in both matrices.
  3. Select the operation you want to perform from the dropdown menu.
  4. Click the Calculate button to see the result.

Addition and subtraction require both matrices to have the same dimensions. Multiplication needs the number of columns in Matrix A to match the number of rows in Matrix B.

Applications of Matrices

Matrices are used in various applications including:

  • Solving systems of linear equations in mathematics and physics
  • Computer graphics for transformations like rotation, scaling, and translation
  • Data analysis and machine learning algorithms
  • Network theory and graph algorithms in computer science

Matrix Operation Examples

Add two 2×2 matrices

Matrix addition combines matching positions from both matrices when their dimensions are the same.

[[1, 2], [3, 4]] + [[5, 6], [7, 8]]

Result: [[6, 8], [10, 12]]

Multiply compatible matrices

Matrix multiplication uses row-by-column products and only works when the inner dimensions match.

[[1, 2], [3, 4]] × [[2, 0], [1, 2]]

Result: [[4, 4], [10, 8]]

Find a determinant

The determinant summarizes key properties of a square matrix and helps decide whether an inverse exists.

det([[4, 7], [2, 6]])

Result: 10

Matrix Calculator FAQ

When can two matrices be added or subtracted?

Two matrices can be added or subtracted only when they have exactly the same number of rows and columns.

When is matrix multiplication possible?

Matrix multiplication is possible when the number of columns in the first matrix equals the number of rows in the second matrix.

Why does a matrix need to be square for determinant or inverse?

Determinants and inverses are defined for square matrices. A non-square matrix does not have a determinant, and it cannot have a standard inverse.

What does it mean if the determinant is zero?

A zero determinant means the matrix is singular, so it does not have an inverse and its rows or columns are linearly dependent.