Skip to main content
Skip to calculator
Advertisement

Last updated: August 1, 2026

Matrix Multiplication Calculator

Quick Answer

Enter Matrix A and Matrix B in row format, and the calculator will multiply them using standard row-by-column dot products when the inner dimensions match. The result includes the product matrix, its dimensions, and the total number of entries in that product.

Enter Matrix A and Matrix B in row form, and if the inner dimensions match the calculator returns the standard matrix product AB.

Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

Each entry of AB is the dot product of a row of A with a column of B.

Where:

  • A=left matrix
  • B=right matrix
  • AB=matrix product
Matrix MultiplicationStandard matrix multiplication combines rows and columns rather than matching entries in the same positions.Matrix MultiplicationMatrix view[ a₁₁ a₁₂ ⋯ ][ a₂₁ a₂₂ ⋯ ][ ⋮ ⋮ ⋱ ]Core formula(AB)ᵢⱼ = Σ aᵢₖbₖⱼRows of A pair with columns of BInner dimensions must matchOrder matters
Standard matrix multiplication combines rows and columns rather than matching entries in the same positions.

Worked Examples

Multiply two 2×2 matrices

Compute [[1,2],[3,4]] · [[5,6],[7,8]].

  1. 1Pair rows of A with columns of B.
  2. 2Compute each dot product.
  3. 3Assemble the product matrix.
Final Answer: productMatrix = [[19, 22], [43, 50]]

2×3 by 3×2 product

Multiply a rectangular pair with matching inner dimension.

  1. 1Check the inner dimensions.
  2. 2Compute each row-column dot product.
Final Answer: dimensions = 2×2

Identity multiplier

Multiplying by I leaves A unchanged.

  1. 1Use the identity columns.
  2. 2Read the original entries back.
Final Answer: productMatrix = [[2, 1], [0, 3]]

Dimension mismatch

A 2×2 matrix cannot multiply a 3×2 matrix on the right.

  1. 1Compare columns of A with rows of B.
  2. 2Stop when the inner dimensions differ.
Final Answer: The calculator returns a validation error.

Introduction

Multiply Matrix A by Matrix B using standard row-by-column multiplication.

Overview

Multiply Matrix A by Matrix B using standard row-by-column multiplication.

  • Product matrix

  • Composing linear transformations

  • Applying matrices to vectors

  • Building matrix powers

Input format

Enter Matrix A and Matrix B in row form.

  • Separate rows with semicolons

  • Separate entries with commas or spaces

  • Brackets are optional

  • Keep row lengths consistent

Formula and method

Each entry of AB is the dot product of a row of A with a column of B.

A matters:

left matrix.

B matters:

right matrix.

Ab matters:

matrix product.

Validation rules

The calculator uses deterministic validation before it computes the final result.

  • Both matrices must be rectangular

  • Columns of A must equal rows of B

  • Every entry must be finite

  • The result shape is rows of A by columns of B

Interpreting the outputs

Use the main result first, then the secondary fields to verify the structure and meaning of the answer.

  • productMatrix is the standard matrix product AB

  • dimensions confirms the size of the result

  • entryCount counts all numbers in the result

  • Order matters, so AB and BA are usually different

Common use cases

These are typical reasons to use this calculator in study or applied work.

  • Composing linear transformations

  • Applying matrices to vectors

  • Building matrix powers

  • Homework verification

FAQs

Why does order matter in matrix multiplication?

Because rows of the left matrix pair with columns of the right matrix.

How do I know if multiplication is allowed?

The number of columns in Matrix A must equal the number of rows in Matrix B.

What shape does the result have?

It has as many rows as Matrix A and as many columns as Matrix B.

Can I multiply rectangular matrices?

Yes, as long as the inner dimensions match.

Is this the Hadamard product?

No. This is standard row-by-column multiplication.

Can I use decimals?

Yes. Any finite real entries are supported.