Matrix Calculator

Reviewed by CalcMulti Editorial Team·Last updated: ·Algebra Hub

A matrix is a rectangular array of numbers arranged in rows and columns. Matrix operations — addition, subtraction, multiplication, and transposition — are foundational in linear algebra, systems of equations, computer graphics, machine learning, and engineering.

Select a matrix size (2×2 or 3×3), enter values for both matrices, choose an operation, and the calculator returns the result with a step-by-step breakdown.

Formula

(A+B)ᵢⱼ = aᵢⱼ + bᵢⱼ | (AB)ᵢⱼ = Σ aᵢₖ·bₖⱼ | (Aᵀ)ᵢⱼ = aⱼᵢ

A, B
input matrices of matching dimensions
aᵢⱼ
element in row i, column j of matrix A
AB
matrix product (A rows × B columns)
Aᵀ
transpose of A — rows and columns swapped
Σ
sum over the shared dimension k

Matrix Operations

Choose a size, enter values, select an operation.

Matrix A

Matrix B

Quick examples:

Matrix Operations Quick Reference

OperationFormulaConditionResult Size
Addition A + B(A+B)ᵢⱼ = aᵢⱼ + bᵢⱼA and B same sizeSame as A and B
Subtraction A − B(A−B)ᵢⱼ = aᵢⱼ − bᵢⱼA and B same sizeSame as A and B
Multiplication A × B(AB)ᵢⱼ = Σ aᵢₖ·bₖⱼA: m×n, B: n×pm×p matrix
Transpose Aᵀ(Aᵀ)ᵢⱼ = aⱼᵢAny matrix An×m if A is m×n
Scalar multiplication cA(cA)ᵢⱼ = c·aᵢⱼAny scalar cSame as A
Identity IDiagonal 1s, rest 0sAI = IA = A

2×2 Multiplication Worked Example

A = [[1,2],[3,4]], B = [[5,6],[7,8]] → AB:

PositionDot ProductCalculationResult
R1C1Row 1 · Col 1(1)(5) + (2)(7)19
R1C2Row 1 · Col 2(1)(6) + (2)(8)22
R2C1Row 2 · Col 1(3)(5) + (4)(7)43
R2C2Row 2 · Col 2(3)(6) + (4)(8)50

Result: [[19, 22], [43, 50]]

Disclaimer

This calculator is for educational purposes only and does not constitute professional advice. Results are based on standard mathematical formulas. Always verify critical calculations with a qualified professional before making important decisions.

Frequently Asked Questions