Linear algebra

How to Multiply Matrices

Multiply matrices by checking dimensions, taking row-by-column dot products, and verifying the shape and selected entries.

Updated 2026-07-27 · Reviewed 2026-07-26 by Chevee Math Tools

Quick answer

To multiply matrices, first classify the problem, preserve the meaning of every transformation, and verify the final result in the original statement. For the worked example Cij = sum_k Aik Bkj, the result is AB = [[19,22],[43,50]]. The method below shows why that result follows rather than presenting it as an unexplained calculator output.

Identify the problem before calculating

The product AB exists when the number of columns of A equals the number of rows of B. The result has the outer dimensions: rows of A by columns of B. This classification step matters because a familiar-looking expression can require a different rule when its structure changes. Write down any domain restriction, unit, dimension, or reference value before manipulating the symbols.

Dimensions and output type are part of the mathematics. Write shapes beside objects before operating so a syntactically neat calculation does not hide an undefined product.

Step-by-step method

  1. Write the dimensions beside each matrix.
  2. Confirm the inner dimensions match.
  3. For each output entry, pair one row of A with one column of B.
  4. Multiply corresponding entries and add the products.
  5. Check the output dimensions and recompute at least one entry.

Each line should answer two questions: what operation was performed, and why that operation preserves or correctly changes the mathematical object. When a calculator or browser tool is used, keep the original input visible so the output can be compared with the source problem.

Worked example

  1. Let A=[[1,2],[3,4]] and B=[[5,6],[7,8]].
  2. The first entry is 1×5 + 2×7 = 19.
  3. The first-row second-column entry is 1×6 + 2×8 = 22.
  4. Continuing gives AB=[[19,22],[43,50]].

The result AB = [[19,22],[43,50]] is not accepted solely because it looks plausible. The example retains the intermediate quantities that make a sign, denominator, exponent, dimension, or rounding mistake visible.

Read the visual explanation

The three diagrams on this page separate the concept, the execution sequence, and the final check. Use the concept diagram to recognize the structure, the workflow diagram while solving, and the verification diagram after obtaining a candidate result. The diagrams are SVG files, so text remains selectable and the graphics stay sharp on mobile screens and when printed.

Common mistakes

  • Multiplying entries position by position.
  • Assuming AB equals BA.
  • Using columns of A with rows of B instead of rows of A with columns of B.

A reliable correction strategy is to return to the earliest line where the mathematical object changed. Repeating only the final arithmetic often reproduces the same hidden setup error.

Verify the result

The result must be 2×2, and its (2,1) entry is 3×5 + 4×7 = 43. Also inspect whether the answer has the correct sign, scale, units, dimension, and domain. For an equation, substitution is decisive. For an inverse pair such as differentiation and integration, apply the inverse operation. For a statistical or financial result, recompute one intermediate quantity and compare it with an independent method.

Use the tool without losing the reasoning

Open the matching browser tool with the worked input when available. The tool is useful for recomputation and output formatting, but the page's decision rule remains necessary: unsupported expressions, ambiguous units, and incorrect assumptions can produce a neat result that answers a different question.

Keep a compact record containing the original problem, the selected method, intermediate values, the final result, and the verification. That record is more useful for study, teaching, and debugging than an isolated answer.

Visual explanation

How to Multiply Matrices concept diagram showing Cij = sum_k Aik Bkj and AB = [[19,22],[43,50]]
Concept diagram for How to Multiply Matrices
How to Multiply Matrices verification diagram showing Cij = sum_k Aik Bkj and AB = [[19,22],[43,50]]
Verification diagram for How to Multiply Matrices
How to Multiply Matrices workflow diagram showing Cij = sum_k Aik Bkj and AB = [[19,22],[43,50]]
Workflow diagram for How to Multiply Matrices

Put this guide into practice

Continue with a browser tool

Use the related reference or tool while the notation and workflow are still fresh.

How this guide was checked

Review method: Problem classification review, independent recomputation, reverse-operation or substitution check, source comparison, and visual accessibility review

Verified against: OpenStax instructional references and the page-specific mathematical sources listed below

What changed: Removed repeated sitewide boilerplate and added content-type-specific decision, verification, and applicability guidance for this exact task.

Page purpose: how to multiply matrices — Learn a reliable method, follow a worked example, and verify the result

Automated quality check: Passed critical indexing checks.

Verification references

These primary standards and official documentation pages were used to check character identity, syntax, or platform behavior described above.

Reuse, attribution, and correction

Share this reference without losing its source

Copy a citation, permanent link, Markdown link, or self-contained embed card. Each reusable format points readers back to the maintained canonical page.

Report an issue

Search the whole reference

Symbols, formulas, guides, tools and commands

Start typing to search.

move · Enter open · Esc close