One Calculator Logo One Calculator
Mathematics & Statistics • Formulas shown

Matrix Calculator

Quick Answer

Enter each row on its own line, with entries separated by spaces. The product of [1 2; 3 4] and [5 6; 7 8] is [19 22; 43 50], because each entry is the dot product of a row of A with a column of B. A matrix has an inverse only if its determinant is not zero.

Result

A × B is a 2 × 2 matrix

A × B
col 1col 2
1922
4350
Step-by-step calculation
  1. Each entry is the dot product of a row of A with a column of B.

About the Matrix Calculator

Type matrices with one row per line and choose an operation. Addition and subtraction need matrices of the same size; multiplication needs the number of columns of A to equal the number of rows of B. The determinant and inverse need a square matrix.

The determinant and inverse use Gaussian elimination with partial pivoting for numerical stability. A determinant of zero means the matrix is singular and has no inverse. Results are shown in a table you can read row by row.

How to Use the Matrix Calculator

  1. Enter matrix A, one row per line.
  2. Choose an operation and enter B if needed.
  3. Read the result table.

Formula and Method

Product

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

2×2 determinant

ad − bc

2×2 inverse

1 ÷ (ad − bc) × [d −b; −c a]

Worked Example

Multiplying 2 × 2 matrices

Input: A = [1 2; 3 4], B = [5 6; 7 8]

  • Row 1: 1×5 + 2×7 = 19; 1×6 + 2×8 = 22
  • Row 2: 3×5 + 4×7 = 43; 3×6 + 4×8 = 50

Result: [19 22; 43 50].

Frequently Asked Questions

Is matrix multiplication commutative?

No. AB usually differs from BA.

What is the identity matrix?

A square matrix with 1s on the diagonal and 0s elsewhere; AI = A.

What is a singular matrix?

A matrix with determinant 0 that has no inverse.

What size can I use?

Up to 8 × 8.

Related Calculators

All Math & Statistics Calculators →

Sources and Further Reading

Accuracy and Scope

Results use standard IEEE-754 double-precision arithmetic and are rounded for display. For exam, engineering or research work, verify critical values with a second method. See our full disclaimer.