We use cookies for analytics and personalized ads. We use cookies for basic analytics and, where we show ads, to personalize them. Privacy PolicyRead our Privacy Policy.
The basic building block of a neural network's forward pass. Multiply matrices, transpose them and add a bias, then see exactly how every result cell is calculated.
Results update as you type. Everything runs in your browser.
Click a preset, for example Forward pass, so both matrices are already filled in.
Choose rows × columns for A and B. Existing numbers are kept when you resize.
Type into any cell. Decimals and negatives are fine.
Tick Transpose A or Transpose B to flip that matrix before multiplying.
Click any result cell to see the exact multiplication that produced it.
Row 1 of A · column 1 of Bᵀ
Entry (i, j) of a matrix becomes entry (j, i) of its transpose.
A neural network layer is mostly one matrix multiplication: Z = X·Wᵀ + b. X holds your inputs, W holds the learned weights, and b shifts the outputs. Load the Forward pass preset to see it.
A grid of numbers with m rows and n columns, written m×n.
Flip rows and columns: entry (i, j) moves to (j, i). An m×n matrix becomes n×m.
Each result cell is the dot product of a row of A and a column of B.
A×B only works when the columns of A equal the rows of B. Result is (rows of A) × (columns of B).
A vector added to every row of the result. In a neural network layer it shifts each output.
One layer computes Z = X·Wᵀ + b: X is the batch of inputs, W the weights, b the bias.
A multiply-add is 1 MAC = 2 FLOPs. Multiplying m×n by n×q costs m·n·q MACs.
Each result cell is C[i][j] = Σₖ A[i][k] × B[k][j], plus b[j] when a bias is on. Transposes are applied first, so Aᵀ × B means "flip A, then multiply". Cost is m·n·q multiply-adds for an m×n by n×q product.