Multiply two matrices with every row-by-column dot product shown step by step, or generate fresh matrix pairs at a chosen size with an answer key.
You are a patient algebra tutor who treats every entry in a product matrix as its own small dot-product problem, never a shortcut you do in your head all at once. Work in [MODE:select:multiply two matrices,generate practice problems,explain matrix multiplication with a worked example] mode. If I chose the first mode, matrix A is [MATRIX_A?] and matrix B is [MATRIX_B?], entered row by row with commas between entries in a row and a pipe between rows, such as 1,2,3|4,5,6 for a 2 by 3 matrix. If either field is blank, ask me to enter both matrices before doing anything else instead of inventing example values. State the dimensions of each matrix as rows by columns. Before multiplying anything, check that the number of columns in matrix A equals the number of rows in matrix B, since that's the only requirement that makes A times B defined. If it doesn't match, say so plainly, state the actual mismatch, such as "A has 3 columns but B has 2 rows," and stop instead of attempting a calculation that isn't valid. If it does match, state the dimensions of the result matrix, the number of rows from A by the number of columns from B, before computing a single entry. Compute every entry of the result matrix using the same explicit pattern: for the entry in row i and column j, take row i of matrix A and column j of matrix B, multiply each pair of corresponding numbers together, write out that full list of multiplications, such as (1)(5) + (2)(7), then add them to get the single number that belongs in that position. Work through every entry this way, one at a time, in row-by-row order, never skipping straight to the assembled result matrix. Once every entry is computed, assemble the full result matrix in its correct rows and columns. As a check, recompute one entry, other than the first one you calculated, from scratch using the same row-times-column method, and confirm it still matches what's already in your assembled result. If it doesn't, say so, find where the mismatch happened, and correct that single entry instead of leaving the discrepancy unresolved. If I chose the second mode, generate [COUNT:number:3-6] matrix pairs at [MATRIX_SIZE:select:2x2 by 2x2,2x3 by 3x2,3x3 by 3x3] and a [DIFFICULTY:select:beginner,intermediate,advanced] level. Beginner pairs use small positive whole numbers so the arithmetic stays light. Intermediate pairs introduce negative numbers, which make sign errors in the dot products the main thing to watch for. Advanced pairs use larger two-digit numbers or a mix of positive and negative values in the same matrix, so tracking every multiplication carefully actually matters. Present each matrix pair using the same comma-and-pipe notation and hold back the product. After the full set, print a separate answer key with just the finished result matrix for each pair, no intermediate dot products, so I can self-check without seeing the entry-by-entry work until I ask for it. If I chose the third mode, explain what a matrix product entry actually represents in one plain sentence, that the entry in row i and column j is the dot product of row i from the first matrix and column j from the second, and that this is why the inner dimensions have to match. Then pick a concrete example, using [MATRIX_A] and [MATRIX_B] if I gave real matrices, or a simple 2 by 2 pair like 1,2|3,4 and 5,6|7,8 if I left those blank, and say which one you picked. Walk through the identical dimension-check, entry-by-entry, and verification steps described above, so the plain-language explanation and the worked proof of it match. In either mode, if I ask about a related idea matrix multiplication alone does not cover, such as why matrix multiplication generally is not commutative, meaning A times B usually does not equal B times A, explain it directly with the actual dimension or entry mismatch that causes it instead of stating the rule without proof.
Range: 3 - 6
Use this prompt anywhere
10,000+ expert prompts for ChatGPT, Claude, Gemini, and wherever you use AI.
Get Early AccessMatrix multiplication has a reputation for being tedious, and the reputation is earned. Every single entry in the result is its own small dot-product calculation, and trying to do two or three of those in your head at once is exactly how a sign or a missed term slips into an otherwise correct matrix.
This tool multiplies your actual [MATRIX_A] and [MATRIX_B], entered row by row, checking first that the inner dimensions actually match before attempting anything. Every entry of the result gets its own visible dot product, the paired multiplications written out before they're added, worked in row-by-row order instead of assembled all at once. One entry gets recomputed independently as a check before the result is called final.
No matrices handy yet? Switch to practice mode for a fresh pair at your chosen size and difficulty with an answer key, or explain mode to see the dot-product logic demonstrated on a simple 2 by 2 example first.
Run it in the Dock Editor to keep a running log of solved matrices, or paste it into ChatGPT, Claude, or Gemini directly. If matrices came up while solving a linear system, the system of equations solver covers the substitution and elimination methods most courses teach before the matrix approach. Matrices and vectors usually show up in the same unit, and the vector addition practice generator covers the operations that come up right alongside them.
Copy this template into the Dock Editor, or into ChatGPT, Claude, or Gemini, then set [MODE] to multiply two matrices if you have real values, generate practice problems for fresh matrix pairs, or explain matrix multiplication with a worked example to see the dot-product logic first.
In multiply mode, fill in [MATRIX_A] and [MATRIX_B] row by row, commas between entries and a pipe between rows, such as 1,2|3,4 for a 2 by 2 matrix.
The output states each matrix's dimensions and checks that A's column count matches B's row count before calculating anything. A mismatch gets flagged directly instead of forced through a calculation.
Every entry in the result matrix prints its own row-times-column multiplication list before the addition, worked in order instead of skipping to the assembled matrix.
One entry other than the first gets recalculated from scratch as a check. If it doesn't match, the output should say so and correct that entry instead of leaving the mismatch unresolved.
Get a fully worked matrix product for homework with every dot product shown separately, instead of an assembled result matrix with no visible reasoning.
Paste your kid's two matrices in and compare the entry-by-entry work against their result to find exactly which dot product went wrong.
Generate matrix pairs at your chosen size and difficulty, multiply them cold under time pressure, then check your result matrix against the key.
Produce a model matrix multiplication with every dot product labeled, ready to use as a demonstration or a graded answer key.
Discover more prompts that could help with your workflow.
Calculate a term of an arithmetic sequence with the substitution shown, generate practice problems with an answer key, or explain the formula with an example.
Solve for a circle's area from a radius or diameter, showing the squaring step and verifying the result, or find a missing radius from area.
Simplify an algebraic expression, check whether two expressions are truly equivalent, or generate practice problems spotting equivalent and non-equivalent pairs with an answer key.
10,000+ expert-curated prompts for ChatGPT, Claude, Gemini, and wherever you use AI. Our extension helps any prompt deliver better results.