Matrix Calculator

Perform matrix operations including addition, subtraction, multiplication, determinant, inverse, transpose, and more. Supports matrices up to 6×6 with step-by-step solutions.

Matrix A

Quick Fill:

Operations

Single Matrix (A):

Two Matrices (A & B):

Scalar Operations:

Matrix B

Quick Fill:

Matrix Operations Explained

Matrix Addition and Subtraction

Matrices can be added or subtracted only if they have the same dimensions. The operation is performed element-wise: (A ± B)ᵢⱼ = Aᵢⱼ ± Bᵢⱼ

[a b] + [e f] = [a+e b+f]
[c d] [g h] [c+g d+h]

Matrix Multiplication

Matrix multiplication is possible when the number of columns in the first matrix equals the number of rows in the second matrix. The result has dimensions m×n where A is m×k and B is k×n.

(AB)ᵢⱼ = Σₖ Aᵢₖ × Bₖⱼ

Determinant

The determinant is a scalar value that provides important information about a square matrix. It determines if the matrix is invertible (det ≠ 0) and represents the scaling factor of the transformation.

For 2×2: det([a b; c d]) = ad - bc
For 3×3: Use cofactor expansion

Matrix Inverse

The inverse of a matrix A is denoted A⁻¹ and satisfies AA⁻¹ = A⁻¹A = I (identity matrix). A matrix is invertible if and only if its determinant is non-zero.

A⁻¹ = (1/det(A)) × adj(A)

Transpose

The transpose of a matrix A, denoted Aᵀ, is formed by swapping rows and columns. If A is m×n, then Aᵀ is n×m.

(Aᵀ)ᵢⱼ = Aⱼᵢ

How to Use This Calculator

1
Set Matrix Dimensions
Choose the number of rows and columns for your matrices (up to 6×6).
2
Enter Matrix Values
Fill in the matrix elements manually or use quick fill options (identity, zero, random, example).
3
Choose Operation
Select from single matrix operations (transpose, determinant, inverse) or two-matrix operations (addition, multiplication).
4
View Results
See the calculated result with step-by-step solution and matrix properties.

Applications of Matrix Calculations

Engineering & Physics

  • Structural analysis and finite element methods
  • Circuit analysis and electrical networks
  • Quantum mechanics and state transformations
  • Control systems and signal processing
  • 3D graphics and computer vision
  • Robotics and transformation matrices

Mathematics & Statistics

  • Linear algebra and vector spaces
  • Systems of linear equations
  • Principal component analysis (PCA)
  • Regression analysis and least squares
  • Markov chains and probability
  • Eigenvalue problems and optimization

Example Calculations

Example 1: 2×2 Matrix Multiplication

A = [1 2] B = [5 6]
[3 4] [7 8]
A × B = [1×5+2×7 1×6+2×8] = [19 22]
[3×5+4×7 3×6+4×8] [43 50]

Example 2: Determinant of 3×3 Matrix

A = [1 2 3]
[4 5 6]
[7 8 9]
det(A) = 1(5×9-6×8) - 2(4×9-6×7) + 3(4×8-5×7)
= 1(45-48) - 2(36-42) + 3(32-35)
= 1(-3) - 2(-6) + 3(-3) = -3 + 12 - 9 = 0

Example 3: Matrix Inverse

A = [1 2] det(A) = 1×4 - 2×3 = -2
[3 4]
A⁻¹ = (1/-2) × [ 4 -2] = [-2 1 ]
[-3 1] [1.5 -0.5]

Frequently Asked Questions

When is a matrix invertible?

A square matrix is invertible (non-singular) if and only if its determinant is non-zero. If the determinant is zero, the matrix is singular and has no inverse.

What does the rank of a matrix tell us?

The rank of a matrix is the maximum number of linearly independent rows (or columns). It indicates the dimension of the vector space spanned by the matrix and is crucial for determining if a system of linear equations has a unique solution.

Why can't I multiply these matrices?

Matrix multiplication A × B is only possible when the number of columns in matrix A equals the number of rows in matrix B. The resulting matrix will have the same number of rows as A and the same number of columns as B.