Files never leave your device

Matrix multiplication calculator

Multiply rectangular matrices and see how a row and column give the first entry. Your inputs stay on your device.

Set up your task

Ready. Processing stays in this browser.

How to use Matrix multiplication calculator

Multiply rectangular matrices and see how a row and column give the first entry. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.

  1. Check the example inputs: Matrix A, Matrix B.
  2. Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.
  3. Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.

Supported inputs and limits

Use up to eight rows and columns per matrix. Separate rows with new lines and values with spaces or commas.

How it works

If A has m rows and k columns and B has k rows and n columns, the product has m rows and n columns. Each entry comes from one row of A and one column of B. Multiply matching entries, then add those products to get a scalar.

Matrix products model the composition of linear transformations. For column vectors, AB applies B first and A second. This order affects the results and sometimes even whether the shapes agree. The worked first entry is a useful check that rows and columns were entered in the order intended.

Example

Run the pre-filled example. Its first result is “Matrix product A × B”.

Matrix A
1 2
3 4
Matrix B
5 6
7 8
Matrix product A × B
[ 19  22 ]
[ 43  50 ]
First entry: dot product of [1  2] and [5  7].

Questions about Matrix multiplication calculator

Can the matrices have different shapes?

Yes. A 2 × 3 matrix can multiply a 3 × 4 matrix, producing a 2 × 4 result.

Is this the same as multiplying matching cells?

No. Elementwise multiplication uses matching positions only. A matrix product takes the dot product of a complete row with a complete column.

Multiply the example A by a two-by-two identity matrix.

Expect A itself. Each column of the identity picks out the matching element of each row of A.

Related tools

Year 1: Foundations

Last updated