Matrix Calculator
🌐 English
A (3×3)
Rows: 3
Cols: 3
B (3×3)
Rows: 3
Cols: 3
Enter matrices A and B, choose their dimensions, and calculate A × B. The number of columns in matrix A must equal the number of rows in matrix B. Supports integers, negative numbers, decimals, and fractions such as 1/2.

A × B is valid

Inner dimensions: 3 = 3

Result size: 3 × 3

B × A: valid, result 3 × 3

Check other matrix dimensions

Learn Matrix Multiplication

Need the method behind the calculator? Use these focused guides for the rules and worked examples.

Calculation Results

Matrix Multiplication Calculator

Use this matrix multiplication calculator with steps to multiply compatible rectangular matrices online. Enter matrix A and matrix B, run A × B, and review both the result matrix and the row-by-column calculations.

How to Use the Matrix Multiplication Calculator

  1. Choose the number of rows and columns for matrix A.
  2. Choose the number of rows and columns for matrix B.
  3. Enter the matrix values.
  4. Click A × B.
  5. Review the result and calculation steps.

The calculator is designed for quick matrix products and step-by-step verification, not as a replacement for the full tutorial pages.

Matrix Dimension Requirement

If A is m×n and B is n×p, then AB is defined and the result is m×p. In other words, the columns of A must match the rows of B.

2×3 × 3×2 valid, result 2×2
3×1 × 1×3 valid, result 3×3
2×3 × 2×2 not valid

Supported Inputs

  • whole numbers
  • negative numbers
  • decimals
  • fractions such as 1/2 and -3/4
  • compatible rectangular matrices

Results and Calculation Steps

After you calculate A × B, the result appears in the Calculation Results area below the operation buttons. The step area shows the row-by-column calculations used to produce the entries of the product matrix, which is useful when checking homework or manual work.

Fraction and decimal output follows the calculator's current calculation behavior. Use the displayed steps to verify how each result entry was formed.

Common Input and Dimension Errors

  • Matrix A columns do not equal Matrix B rows.
  • A matrix cell is empty.
  • A value is entered in an unsupported format.
  • A fraction has zero as its denominator.
  • Rows and columns are set incorrectly.

Short Example

A 2×3 matrix can be multiplied by a 3×1 matrix, producing a 2×1 result.

For complete worked examples, use the tutorial links below instead of treating this calculator page as a long lesson.

Learn Matrix Multiplication

Learn how matrix multiplication works in the general guide, follow a complete 2×2 example, or see all nine steps in a 3×3 example.

Why Use This Calculator?

  • quick result
  • step-by-step verification
  • fractions and decimals
  • rectangular matrix support
  • useful for checking manual work

Frequently Asked Questions (FAQ)

How do I multiply two matrices with this calculator?

Choose the row and column counts for A and B, enter the values, then click A × B. The calculator displays the product matrix and calculation steps.

What matrix sizes can be multiplied?

Matrix A can be multiplied by matrix B when the number of columns in A equals the number of rows in B. For more detail, see the matrix multiplication guide.

Does the calculator show steps?

Yes. The result area includes step-by-step row-by-column calculations for the matrix product.

Can I enter fractions and decimals?

Yes. You can enter whole numbers, negative numbers, decimals, and fractions such as 1/2 or -3/4.

Why can't my two matrices be multiplied?

The most common reason is a dimension mismatch: the number of columns in A does not equal the number of rows in B. Check the row and column settings before calculating.

Is matrix multiplication commutative?

Usually no. AB and BA can give different results, and one order may be defined while the other is not. The how-to guide explains the rule in more detail.

Learn matrix multiplication more easily in just 2 minutes with this free game.

Matrix Multiplication Game