Matrix Calculator

Professional matrix calculator for addition, subtraction, multiplication, determinant, inverse, transpose, rank, trace, and RREF. Mobile-first, accessible, and fast.

Matrix Calculator

A professional-grade, mobile-first matrix calculator for students, engineers, and researchers. Compute addition, subtraction, multiplication, determinant, inverse, transpose, rank, trace, RREF, and solve Ax = b with accessible, high-precision algorithms and instant results.

Calculator

Matrix dimensions
Supported dimensions: 1–6. Square matrices are required for determinant, trace, and inverse.

Matrix A

Matrix B

All empty cells are treated as 0. Inline validation runs when fields lose focus.

Results

Ready. Choose an operation and edit the matrices to begin.

Data Source and Methodology

Authoritative references:

  • Gilbert Strang, “Introduction to Linear Algebra,” 5th ed., Wellesley–Cambridge Press, 2016. MIT OpenCourseWare 18.06: https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/
  • Gene H. Golub and Charles F. Van Loan, “Matrix Computations,” 4th ed., Johns Hopkins University Press, 2013.

Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.

Algorithms implemented: Gaussian elimination with partial pivoting for determinant, inverse, RREF, and solving linear systems; direct element-wise definitions for addition, subtraction, transpose, trace, and rank via RREF.

The Formula Explained

Matrix addition: \( C = A + B,\; c_{ij} = a_{ij} + b_{ij} \).

Matrix subtraction: \( C = A - B,\; c_{ij} = a_{ij} - b_{ij} \).

Matrix multiplication: \( C = A B,\; c_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj} \).

Transpose: \( A^{\top},\; (A^{\top})_{ij} = a_{ji} \).

Trace (square A): \( \operatorname{tr}(A) = \sum_{i=1}^{n} a_{ii} \).

Determinant (via elimination): \( \det(A) = (-1)^s \prod_{i=1}^{n} u_{ii} \), where \( U \) is the upper-triangular matrix after elimination and \( s \) the number of row swaps.

Inverse (if nonsingular): Use Gauss–Jordan on \( [A \mid I] \to [I \mid A^{-1}] \).

RREF: Apply Gauss–Jordan to reduce A to row-reduced echelon form.

Rank: Number of nonzero rows in RREF within a tolerance \( \varepsilon \).

Solve \( A x = b \): Use RREF of \( [A \mid b] \); if \( A \) invertible, \( x = A^{-1} b \).

Glossary of Variables

  • A, B: Input matrices with dimensions m×n and p×q.
  • b: Right-hand-side column vector (m×1) for solving Ax = b.
  • cij: Entry in row i, column j of result matrix C.
  • det(A): Scalar determinant of square matrix A.
  • A⁻¹: Inverse of A if det(A) ≠ 0.
  • Aᵀ: Transpose of A.
  • tr(A): Trace, sum of diagonal entries of A (square).
  • rank(A): Number of linearly independent rows/columns of A.
  • RREF(A): Row-reduced echelon form of A.

How It Works: A Step-by-Step Example

Task: Multiply two 2×2 matrices.

Let \( A = \begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix} \), \( B = \begin{bmatrix}2 & 0 \\ 1 & 2\end{bmatrix} \).

Then \( C = A B \) with entries \( c_{ij} = \sum_{k=1}^{2} a_{ik} b_{kj} \).

Compute: \( c_{11} = 1\cdot2 + 2\cdot1 = 4 \), \( c_{12} = 1\cdot0 + 2\cdot2 = 4 \), \( c_{21} = 3\cdot2 + 4\cdot1 = 10 \), \( c_{22} = 3\cdot0 + 4\cdot2 = 8 \).

Result: \( C = \begin{bmatrix}4 & 4 \\ 10 & 8\end{bmatrix} \).

Frequently Asked Questions (FAQ)

What is the maximum matrix size?

Up to 6×6 in this tool to ensure responsiveness and great performance on mobile devices.

Do empty inputs count as zeros?

Yes. Blank cells are treated as 0 to streamline data entry.

How does the tool ensure numerical stability?

Partial pivoting is used during elimination. Small values under a tolerance (1e−10) are treated as zero in RREF/rank.

Can it detect when A is singular?

Yes. If the pivot falls under tolerance, the inverse is not computed and an explanatory error is shown.

How can I copy results?

Use “Copy as CSV” to paste into spreadsheets, or “Copy as LaTeX” to paste into scientific documents.

Is there a way to analyze solution sets?

Use RREF(A) or Solve Ax = b. For underdetermined systems, the tool shows one solution if available and you can inspect the RREF for free variables.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted text)
Matrix addition: \( C = A + B,\; c_{ij} = a_{ij} + b_{ij} \). Matrix subtraction: \( C = A - B,\; c_{ij} = a_{ij} - b_{ij} \). Matrix multiplication: \( C = A B,\; c_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj} \). Transpose: \( A^{\top},\; (A^{\top})_{ij} = a_{ji} \). Trace (square A): \( \operatorname{tr}(A) = \sum_{i=1}^{n} a_{ii} \). Determinant (via elimination): \( \det(A) = (-1)^s \prod_{i=1}^{n} u_{ii} \), where \( U \) is the upper-triangular matrix after elimination and \( s \) the number of row swaps. Inverse (if nonsingular): Use Gauss–Jordan on \( [A \mid I] \to [I \mid A^{-1}] \). RREF: Apply Gauss–Jordan to reduce A to row-reduced echelon form. Rank: Number of nonzero rows in RREF within a tolerance \( \varepsilon \). Solve \( A x = b \): Use RREF of \( [A \mid b] \); if \( A \) invertible, \( x = A^{-1} b \).
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn

Full original guide (expanded)

Matrix Calculator

A professional-grade, mobile-first matrix calculator for students, engineers, and researchers. Compute addition, subtraction, multiplication, determinant, inverse, transpose, rank, trace, RREF, and solve Ax = b with accessible, high-precision algorithms and instant results.

Calculator

Matrix dimensions
Supported dimensions: 1–6. Square matrices are required for determinant, trace, and inverse.

Matrix A

Matrix B

All empty cells are treated as 0. Inline validation runs when fields lose focus.

Results

Ready. Choose an operation and edit the matrices to begin.

Data Source and Methodology

Authoritative references:

  • Gilbert Strang, “Introduction to Linear Algebra,” 5th ed., Wellesley–Cambridge Press, 2016. MIT OpenCourseWare 18.06: https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/
  • Gene H. Golub and Charles F. Van Loan, “Matrix Computations,” 4th ed., Johns Hopkins University Press, 2013.

Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.

Algorithms implemented: Gaussian elimination with partial pivoting for determinant, inverse, RREF, and solving linear systems; direct element-wise definitions for addition, subtraction, transpose, trace, and rank via RREF.

The Formula Explained

Matrix addition: \( C = A + B,\; c_{ij} = a_{ij} + b_{ij} \).

Matrix subtraction: \( C = A - B,\; c_{ij} = a_{ij} - b_{ij} \).

Matrix multiplication: \( C = A B,\; c_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj} \).

Transpose: \( A^{\top},\; (A^{\top})_{ij} = a_{ji} \).

Trace (square A): \( \operatorname{tr}(A) = \sum_{i=1}^{n} a_{ii} \).

Determinant (via elimination): \( \det(A) = (-1)^s \prod_{i=1}^{n} u_{ii} \), where \( U \) is the upper-triangular matrix after elimination and \( s \) the number of row swaps.

Inverse (if nonsingular): Use Gauss–Jordan on \( [A \mid I] \to [I \mid A^{-1}] \).

RREF: Apply Gauss–Jordan to reduce A to row-reduced echelon form.

Rank: Number of nonzero rows in RREF within a tolerance \( \varepsilon \).

Solve \( A x = b \): Use RREF of \( [A \mid b] \); if \( A \) invertible, \( x = A^{-1} b \).

Glossary of Variables

  • A, B: Input matrices with dimensions m×n and p×q.
  • b: Right-hand-side column vector (m×1) for solving Ax = b.
  • cij: Entry in row i, column j of result matrix C.
  • det(A): Scalar determinant of square matrix A.
  • A⁻¹: Inverse of A if det(A) ≠ 0.
  • Aᵀ: Transpose of A.
  • tr(A): Trace, sum of diagonal entries of A (square).
  • rank(A): Number of linearly independent rows/columns of A.
  • RREF(A): Row-reduced echelon form of A.

How It Works: A Step-by-Step Example

Task: Multiply two 2×2 matrices.

Let \( A = \begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix} \), \( B = \begin{bmatrix}2 & 0 \\ 1 & 2\end{bmatrix} \).

Then \( C = A B \) with entries \( c_{ij} = \sum_{k=1}^{2} a_{ik} b_{kj} \).

Compute: \( c_{11} = 1\cdot2 + 2\cdot1 = 4 \), \( c_{12} = 1\cdot0 + 2\cdot2 = 4 \), \( c_{21} = 3\cdot2 + 4\cdot1 = 10 \), \( c_{22} = 3\cdot0 + 4\cdot2 = 8 \).

Result: \( C = \begin{bmatrix}4 & 4 \\ 10 & 8\end{bmatrix} \).

Frequently Asked Questions (FAQ)

What is the maximum matrix size?

Up to 6×6 in this tool to ensure responsiveness and great performance on mobile devices.

Do empty inputs count as zeros?

Yes. Blank cells are treated as 0 to streamline data entry.

How does the tool ensure numerical stability?

Partial pivoting is used during elimination. Small values under a tolerance (1e−10) are treated as zero in RREF/rank.

Can it detect when A is singular?

Yes. If the pivot falls under tolerance, the inverse is not computed and an explanatory error is shown.

How can I copy results?

Use “Copy as CSV” to paste into spreadsheets, or “Copy as LaTeX” to paste into scientific documents.

Is there a way to analyze solution sets?

Use RREF(A) or Solve Ax = b. For underdetermined systems, the tool shows one solution if available and you can inspect the RREF for free variables.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted text)
Matrix addition: \( C = A + B,\; c_{ij} = a_{ij} + b_{ij} \). Matrix subtraction: \( C = A - B,\; c_{ij} = a_{ij} - b_{ij} \). Matrix multiplication: \( C = A B,\; c_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj} \). Transpose: \( A^{\top},\; (A^{\top})_{ij} = a_{ji} \). Trace (square A): \( \operatorname{tr}(A) = \sum_{i=1}^{n} a_{ii} \). Determinant (via elimination): \( \det(A) = (-1)^s \prod_{i=1}^{n} u_{ii} \), where \( U \) is the upper-triangular matrix after elimination and \( s \) the number of row swaps. Inverse (if nonsingular): Use Gauss–Jordan on \( [A \mid I] \to [I \mid A^{-1}] \). RREF: Apply Gauss–Jordan to reduce A to row-reduced echelon form. Rank: Number of nonzero rows in RREF within a tolerance \( \varepsilon \). Solve \( A x = b \): Use RREF of \( [A \mid b] \); if \( A \) invertible, \( x = A^{-1} b \).
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn

Matrix Calculator

A professional-grade, mobile-first matrix calculator for students, engineers, and researchers. Compute addition, subtraction, multiplication, determinant, inverse, transpose, rank, trace, RREF, and solve Ax = b with accessible, high-precision algorithms and instant results.

Calculator

Matrix dimensions
Supported dimensions: 1–6. Square matrices are required for determinant, trace, and inverse.

Matrix A

Matrix B

All empty cells are treated as 0. Inline validation runs when fields lose focus.

Results

Ready. Choose an operation and edit the matrices to begin.

Data Source and Methodology

Authoritative references:

  • Gilbert Strang, “Introduction to Linear Algebra,” 5th ed., Wellesley–Cambridge Press, 2016. MIT OpenCourseWare 18.06: https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/
  • Gene H. Golub and Charles F. Van Loan, “Matrix Computations,” 4th ed., Johns Hopkins University Press, 2013.

Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.

Algorithms implemented: Gaussian elimination with partial pivoting for determinant, inverse, RREF, and solving linear systems; direct element-wise definitions for addition, subtraction, transpose, trace, and rank via RREF.

The Formula Explained

Matrix addition: \( C = A + B,\; c_{ij} = a_{ij} + b_{ij} \).

Matrix subtraction: \( C = A - B,\; c_{ij} = a_{ij} - b_{ij} \).

Matrix multiplication: \( C = A B,\; c_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj} \).

Transpose: \( A^{\top},\; (A^{\top})_{ij} = a_{ji} \).

Trace (square A): \( \operatorname{tr}(A) = \sum_{i=1}^{n} a_{ii} \).

Determinant (via elimination): \( \det(A) = (-1)^s \prod_{i=1}^{n} u_{ii} \), where \( U \) is the upper-triangular matrix after elimination and \( s \) the number of row swaps.

Inverse (if nonsingular): Use Gauss–Jordan on \( [A \mid I] \to [I \mid A^{-1}] \).

RREF: Apply Gauss–Jordan to reduce A to row-reduced echelon form.

Rank: Number of nonzero rows in RREF within a tolerance \( \varepsilon \).

Solve \( A x = b \): Use RREF of \( [A \mid b] \); if \( A \) invertible, \( x = A^{-1} b \).

Glossary of Variables

  • A, B: Input matrices with dimensions m×n and p×q.
  • b: Right-hand-side column vector (m×1) for solving Ax = b.
  • cij: Entry in row i, column j of result matrix C.
  • det(A): Scalar determinant of square matrix A.
  • A⁻¹: Inverse of A if det(A) ≠ 0.
  • Aᵀ: Transpose of A.
  • tr(A): Trace, sum of diagonal entries of A (square).
  • rank(A): Number of linearly independent rows/columns of A.
  • RREF(A): Row-reduced echelon form of A.

How It Works: A Step-by-Step Example

Task: Multiply two 2×2 matrices.

Let \( A = \begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix} \), \( B = \begin{bmatrix}2 & 0 \\ 1 & 2\end{bmatrix} \).

Then \( C = A B \) with entries \( c_{ij} = \sum_{k=1}^{2} a_{ik} b_{kj} \).

Compute: \( c_{11} = 1\cdot2 + 2\cdot1 = 4 \), \( c_{12} = 1\cdot0 + 2\cdot2 = 4 \), \( c_{21} = 3\cdot2 + 4\cdot1 = 10 \), \( c_{22} = 3\cdot0 + 4\cdot2 = 8 \).

Result: \( C = \begin{bmatrix}4 & 4 \\ 10 & 8\end{bmatrix} \).

Frequently Asked Questions (FAQ)

What is the maximum matrix size?

Up to 6×6 in this tool to ensure responsiveness and great performance on mobile devices.

Do empty inputs count as zeros?

Yes. Blank cells are treated as 0 to streamline data entry.

How does the tool ensure numerical stability?

Partial pivoting is used during elimination. Small values under a tolerance (1e−10) are treated as zero in RREF/rank.

Can it detect when A is singular?

Yes. If the pivot falls under tolerance, the inverse is not computed and an explanatory error is shown.

How can I copy results?

Use “Copy as CSV” to paste into spreadsheets, or “Copy as LaTeX” to paste into scientific documents.

Is there a way to analyze solution sets?

Use RREF(A) or Solve Ax = b. For underdetermined systems, the tool shows one solution if available and you can inspect the RREF for free variables.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted text)
Matrix addition: \( C = A + B,\; c_{ij} = a_{ij} + b_{ij} \). Matrix subtraction: \( C = A - B,\; c_{ij} = a_{ij} - b_{ij} \). Matrix multiplication: \( C = A B,\; c_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj} \). Transpose: \( A^{\top},\; (A^{\top})_{ij} = a_{ji} \). Trace (square A): \( \operatorname{tr}(A) = \sum_{i=1}^{n} a_{ii} \). Determinant (via elimination): \( \det(A) = (-1)^s \prod_{i=1}^{n} u_{ii} \), where \( U \) is the upper-triangular matrix after elimination and \( s \) the number of row swaps. Inverse (if nonsingular): Use Gauss–Jordan on \( [A \mid I] \to [I \mid A^{-1}] \). RREF: Apply Gauss–Jordan to reduce A to row-reduced echelon form. Rank: Number of nonzero rows in RREF within a tolerance \( \varepsilon \). Solve \( A x = b \): Use RREF of \( [A \mid b] \); if \( A \) invertible, \( x = A^{-1} b \).
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
Formulas

(Formulas preserved from original page content, if present.)

Version 0.1.0-draft
Citations

Add authoritative sources relevant to this calculator (standards bodies, manuals, official docs).

Changelog
  • 0.1.0-draft — 2026-01-19: Initial draft (review required).