CALCULATE · INSPECT · COMPARE
Matrix multiplication: follow every accumulator
Choose a row and column. Watch their products build one output entry.
Your experiment
Set the input scale to zero: every output must be zero. Then paste [[1,0,0],[0,1,0]] into the input editor using the default 2 × 3 shape. The two output rows must equal the first two weight rows.
Play inspects the entire calculated trace over 60 seconds at 1×. Use 0.5× for two minutes, pause, or step through individual operations. Restart preserves your inputs. Changing a model input rebuilds the calculation without autoplay.
What the calculation means
For X with shape n × d and W with shape d × m, Y has shape n × m. This trace performs n·d·m multiply-accumulates in row/column/inner-dimension order. It does not claim a hardware throughput or a Python-versus-BLAS speedup.
Matrix values at this step
Canvas and tables round labels for readability. The inspector preserves full JavaScript number values.
Full-precision operation inspector
A bounded mathematical teaching model. Playback measures inspection time, not computation or training latency. No model weights are downloaded; no external inference, storage or training is performed. Read the official AICassindra articles.
An accumulator for every output cell
This lesson evaluates Y = XW using row vectors. With Input rows n, Input width d and Output width m, X has shape n by d, W has shape d by m and Y has shape n by m. Each output cell starts at zero and receives exactly d products. The highlighted input row and weight column identify the current factors; the caption shows the previous accumulator, the new term and the updated result. The trace uses row, column, then inner-coordinate ordering. No neural network activation or bias is hidden in the calculation.
Generated matrices and explicit input
Input rows sets the number of independent token rows. Input width sets the features in each row. Matrix fixture seed deterministically regenerates small signed integers, so record it with every comparison. Generated input scale multiplies the generated input values, including negative or zero scaling. Open Edit the input matrix to enter a rectangular JSON array matching the selected row and feature counts. An explicit matrix overrides generated input values and input scaling, but the seed still determines any generated weight matrices. Clear the editor to restore the generated fixture. Malformed JSON, a mismatched shape or any component outside minus one hundred through one hundred disables calculation and clears stale results.
Reproduce a selection-matrix experiment
Choose two Input rows, Input width three, Output width two and seed seven. Paste [[1,0,0],[0,1,0]] in the input editor. Seek to the end: output row zero must equal weight row zero, and output row one must equal weight row one. This follows because each row selects exactly one term and zeroes the other terms. Change Output width to three; the same selector now returns three values from each selected weight row. Changing the seed produces different weights and therefore different selected values. The inspector provides full precision when rounded canvas labels are insufficient.
Test zero and sign boundaries
Clear the editor and set Generated input scale to zero. Every output entry must remain zero even though the same number of multiply-accumulates is inspected. With the remaining controls fixed, compare scale one and minus one: all final outputs reverse sign. Changing Input rows changes the number of row calculations; changing either width changes the compatible matrix shapes. Count n times d times m multiply-accumulates in the last inspector frame. Logical scalar reads count two factors per product; they are not cache misses or physical memory transactions. This toy model does not predict throughput, numerical error in other data types, or an implementation choice for real matrix libraries.
Inspect computation at your own pace
Play spreads the finite operation trace over sixty seconds at normal speed. Pause freezes the arrays and accumulator so you can compare a highlighted input with its contribution. Next operation advances one recorded calculation and pauses. Restart returns to the first frame while preserving the current experiment inputs; it is not a factory reset. Speed selects a quarter, half, normal or double inspection rate. The Inspection slider directly selects a point in that minute and pauses playback. Editing any model parameter rebuilds the trace at its beginning without autoplay. These are viewing times, not CPU performance measurements.