Matrix Inputs

Matrix A
Matrix B
Used for scalar multiplication (k × A)

Operations

Result

Select an operation and click Calculate.

How to Use the Matrix Calculator

  1. Set sizes — Choose grid size (2×2 to 5×5) independently for Matrix A and Matrix B.
  2. Enter values — Click each cell and type a number. Use Random Fill to populate with test values.
  3. Select operation — Click the operation button (A+B, A−B, A×B, det(A), A⁻¹, Aᵀ, or k×A).
  4. Calculate — Press the Calculate button to see the result and step-by-step breakdown.

Supported Operations

OperationDescriptionRequires
A + BElement-wise additionSame dimensions
A − BElement-wise subtractionSame dimensions
A × BMatrix multiplicationA cols = B rows
det(A)Determinant with cofactor stepsSquare matrix A
A⁻¹Inverse via Gauss-JordanSquare, non-singular A
AᵀTranspose of AAny matrix A
k × AScalar multiplicationAny matrix A

What is a Matrix?

A matrix is a rectangular array of numbers arranged in rows and columns. Matrices are fundamental to linear algebra, computer graphics, machine learning, physics simulations, and engineering.

  • Square matrix: same number of rows and columns (required for determinant/inverse)
  • Determinant: a scalar value encoding geometric scaling; zero means the matrix is singular
  • Inverse: A⁻¹ such that A × A⁻¹ = I (identity matrix)
  • Transpose: rows become columns and vice versa