Free online tools to generate, calculate, convert, format, transform, and de/en-code.
 

Matrix Calculator

Perform matrix operations including addition, subtraction, multiplication, determinant, and inverse calculations.

Matrix A
Matrix B
Operations

Result


About Matrix Operations

Matrix Addition & Subtraction

Matrices can be added or subtracted element-wise if they have the same dimensions. For example, if A and B are both 2×2 matrices:

A + B = [a₁₁ + b₁₁, a₁₂ + b₁₂]
        [a₂₁ + b₂₁, a₂₂ + b₂₂]
Matrix Multiplication

Matrix multiplication is performed by taking the dot product of rows and columns. For an m×n matrix A and an n×p matrix B, the result is an m×p matrix. The element at position (i,j) is the sum of products of the i-th row of A and j-th column of B.

Determinant

The determinant is a scalar value that can be computed from a square matrix. It provides important information about the matrix, including whether it's invertible (non-zero determinant).

  • 2×2: det(A) = a₁₁×a₂₂ - a₁₂×a₂₁
  • 3×3: Calculated using the rule of Sarrus or cofactor expansion
  • 4×4: Calculated using cofactor expansion
Matrix Inverse

The inverse of a matrix A (denoted A⁻¹) is a matrix such that A × A⁻¹ = I (identity matrix). A matrix is invertible only if its determinant is non-zero. The inverse is calculated using:

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

where adj(A) is the adjugate (transpose of the cofactor matrix).

Tips:
  • Use the "Random" button to generate random test matrices
  • Use the "Identity" button to create an identity matrix (1s on diagonal, 0s elsewhere)
  • The determinant must be non-zero for a matrix to have an inverse
  • Matrix multiplication is not commutative: A×B ≠ B×A in general

Feedback

Help us improve this page by providing feedback:


Share with