Set the dimensions of A and B, edit each matrix directly, and calculate AB. The calculator checks compatibility and shows how every result entry is formed.
Result
The product AB is a 2 by 2 matrix
[5813964154]
Conditions
A has dimensions 2 by 3 and B has dimensions 3 by 2.
The inner dimensions match: columns(A) = 3 = rows(B).
Steps
Check the dimensions A is 2 by 3 and B is 3 by 2, so AB exists and will be 2 by 2.(2×3)(3×2)⟶2×2
Calculate the first result entry Multiply row 1 of A by column 1 of B and add the products.c11=1(7)+2(9)+3(11)=58
Repeat for every row and column pair Each output position uses one row of A and one column of B.AB=[5813964154]
✓
Independent check
A separate finite-number calculation reproduced all four entries and confirmed the 2 by 2 output shape.
Scope
What this matrix multiplication covers
The product AB exists when the number of columns in A equals the number of rows in B. If A is m by n and B is n by p, then AB is m by p.
Check whether AB is defined
Compare columns of A with rows of B before multiplying, and preserve the requested dimensions when they do not match.
Examples: 2 by 3 times 3 by 4 is defined, 2 by 3 times 2 by 2 is undefined
Multiply rectangular matrices
Use independent dimensions for A and B, then form an output with rows of A and columns of B.
Examples: 2 by 3 times 3 by 2, 1 by 4 times 4 by 3
Inspect every dot product
See the row entries, column entries, products, and sum that produce each output cell.
Examples: c11, c12, c21, c22
Keep fractions exact
Multiply and add rational entries without rounding away the structure of the answer.
Examples: 1/2, -3/4, 1.25
How to use it
Enter enough information for one clear task
1
Choose the size of A
Set rows and columns from one to four, then select any visible entry and type with the math keyboard. Existing values stay in place when a dimension is changed.
2
Choose the size of B
For AB to exist, the row count of B must equal the column count of A. The compatibility message updates before calculation.
3
Multiply matrices
The result has one row for each row of A and one column for each column of B.
4
Open the cell-level steps
For each cij, follow row i of A across column j of B. The displayed sum explains the exact result entry.
Worked inputs
Examples to try
Use these examples to recognize the method, compare equivalent forms, and check your own work.
Multiply two 2 by 2 matrices
Use each row of A against each column of B.
[20−13][425−2]
Expected result
[6612−6]
Rectangular product
The inner dimensions are both 3, so the result is 2 by 2.
[142536]791181012
Expected result
[5813964154]
Row times column
One dot product produces a 1 by 1 result.
[2−14]35−2
Expected result
[−7]
Multiply by the identity matrix
The identity columns select the original columns of A.
[35−21][1001]
Expected result
[35−21]
Multiply by a zero matrix
Every dot product contains only zero contributions.
[12−43][0000]
Expected result
[0000]
Multiply exact fractions
Keep each rational product exact before adding.
[21012][21021]
Expected result
[22211]
See why order matters
AB and BA use different row-column pairings.
A=[1011],B=[1101]
Expected result
AB=[2111]=[1112]=BA
Complete example
Multiply a 2 by 3 matrix by a 3 by 2 matrix
The three columns of A match the three rows of B. The product will use the two outer dimensions, so AB is 2 by 2.
The four dot products fill a 2 by 2 result matrix.
AB=[5813964154]
AB=[5813964154]
Verification: Independent numerical loops reproduce 58, 64, 139, and 154, and the result has rows(A)=2 and columns(B)=2.
Avoidable errors
Common mistakes and how to fix them
Comparing the outer dimensions
Problem: Require rows of A to equal columns of B.
Why it matters: The dot products pair a row of A with a column of B, so their lengths come from columns of A and rows of B.
Better approach: Check columns(A)=rows(B). Use rows(A) by columns(B) for the output shape.
Multiplying corresponding entries
Problem: Multiply a11 by b11, a12 by b12, and stop.
Why it matters: That is an entrywise operation, not the row-by-column definition of matrix multiplication.
Better approach: For cij, multiply every entry in row i of A by the matching entry in column j of B, then add.
Assuming AB equals BA
Problem: Reverse the matrices without recalculating.
Why it matters: The dimensions may change or BA may be undefined, and even two defined products usually have different entries.
Better approach: Treat order as part of the problem and calculate the requested product only.
Predicting the wrong result size
Problem: Copy the dimensions of A or B automatically.
Why it matters: The shared inner dimension disappears into each dot product.
Better approach: Keep the two outer dimensions: rows of A by columns of B.
Trust the result for the right reasons
Checks, assumptions, and limits
How results are checked
Every entry is parsed by the site's Nerdamer mathematics library before multiplication.
Each result cell is built from an explicit row-by-column exact sum.
A separate finite-number implementation recomputes every product cell.
The result shape is checked against rows(A) by columns(B).
When to stop and revise the input
This release accepts finite real integers, decimals, and simple fractions, not variables or complex entries.
Each input matrix is limited to 4 by 4 so cell-level explanations remain usable.
The calculator evaluates AB only; chained products and powers require separate steps.
An incompatible product remains undefined and is never changed into entrywise multiplication.
Common questions
Multiply matrices row by column FAQ
When can matrix A be multiplied by matrix B?
AB is defined when the number of columns in A equals the number of rows in B. Those are the inner dimensions used in every dot product.
What size is the product matrix?
If A is m by n and B is n by p, then AB is m by p. The result keeps the rows of A and the columns of B.
Why does the calculator show one step per result cell?
Each cij comes from a different row-column pairing. Showing the products and their sum makes it possible to locate a sign or arithmetic mistake instead of accepting an opaque result.
Does AB always equal BA?
No. Matrix multiplication is generally not commutative. BA can have different entries, a different shape, or be undefined even when AB exists.
Can matrix entries be fractions?
Yes. Enter simple fractions such as 1/2 or -3/4. The calculator keeps them exact through the row-by-column sums.
Sources and curriculum alignment
This page follows standard introductory mathematics notation and learning sequences. Use these references to continue with a complete course treatment.