Matrix-matrix multiplication
Matrix multiplication combines compatible matrices to form a result whose entries are sums of products between rows of the first matrix and columns of the second.
Geometry for Programmers
Matrix multiplication is an operation that combines matrices by taking row-column dot products to produce a new matrix or vector.
- How it is used
- Unifies geometric transformations, point projection, and linear-equation notation as number-crunching operations.
- How deep it goes
- Defines row-column products, dimension constraints, noncommutativity, vector cases, and composable projective transformations.
- Examples
- Uses point projection, quadrilateral transformation, vector-matrix products, and matrix forms of linear systems.
- What you can do after
- Apply it via transformation routines or write direct routines when framework overhead or missing operations demand it.
Read how Geometry for Programmers explains matrix-matrix multiplication →
Math and Architectures of Deep Learning
The result of multiplying two compatible matrices, here discussed under the rule that transposition reverses the order of factors.
- How it is used
- Packages many weighted sums into compact machine-learning computations and represents linear transformations in finite dimensions.
- How deep it goes
- Defines compatibility, dimensions, row-column dot products, noncommutativity, transposition, and PyTorch execution without deriving multiplication algorithms internally.
- Examples
- Uses a three-by-two times two-by-two numeric product, PyTorch tensors, weighted-sum models, and convolution weight matrices.
- What you can do after
- Apply it via PyTorch's torch.matmul and verify products, dimensions, dot products, and transpose identities.
Read how Math and Architectures of Deep Learning explains matrix-matrix multiplication →
Statistics Every Programmer Needs
Matrix multiplication is an algebraic operation that forms each result entry from the dot product of a row of one matrix and a column of another.
- How it is used
- Forecasts future state distributions by composing transition probabilities across multiple periods.
- How deep it goes
- Defines multiplication through dot products and demonstrates iterative and direct two-period computation, without developing broader algebraic theory.
- Examples
- Uses cellular-market shares, a four-state transition matrix, NumPy dot products, and matching period-2 forecasts.
- What you can do after
- Apply it via NumPy to calculate multi-period transition matrices and forecast state distributions.
Read how Statistics Every Programmer Needs explains matrix-matrix multiplication →
Learn Concurrent Programming with Go
Matrix multiplication is the linear-algebra operation that computes a matrix product from weighted sums of rows and columns.
- How it is used
- Uses matrix multiplication to demonstrate parallel computation and barrier synchronization in Go.
- How deep it goes
- Explains the cubic algorithm, row-column calculation, faster alternatives, and a barrier-based concurrent implementation.
- Examples
- Uses 3 × 3 matrices, random entries from −5 through 4, row workers, and printed multiplication results.
- What you can do after
- Build it from scratch using nested loops, then parallelize rows with goroutines and coordinate them with barriers.
Read how Learn Concurrent Programming with Go explains matrix-matrix multiplication →
Inside Deep Learning: Math, Algorithms, Models
The binary operation that multiplies two matrices to produce a new matrix, written with the @ operator in Python and used here for performance comparison.
- How it is used
- Benchmarks matrix multiplication across CPU and GPU devices while reinforcing tensor-shape reasoning for neural-network operations.
- How deep it goes
- Defines the shape rule and demonstrates timing and device placement, but does not derive the scalar multiplication formula.
- Examples
- Uses 2¹¹×2¹¹ tensors, repeated x@x timings, CUDA transfers, and a mixed-device error example.
- What you can do after
- Apply matrix multiplication with PyTorch's @ operator and timeit, then diagnose shape, workload-size, and device-placement problems.
Read how Inside Deep Learning: Math, Algorithms, Models explains matrix-matrix multiplication →
Build a Robo-Advisor with Python (From Scratch)
Matrix multiplication is an algebraic operation that combines rows of one matrix with columns of another to produce a new matrix or vector.
- How it is used
- Computes portfolio expected returns, covariance matrices, and standard deviations during portfolio construction.
- How deep it goes
- Explains vector and covariance expressions with executable NumPy examples, while stopping short of broader linear-algebra theory.
- Examples
- Uses FE, WMT, and AAPL weights, asset statistics, covariance construction, and portfolio standard-deviation calculations.
- What you can do after
- Apply it via NumPy to calculate portfolio returns, covariance matrices, and risk measures without explicit loops.
Read how Build a Robo-Advisor with Python (From Scratch) explains matrix-matrix multiplication →
Deep Learning with R, Third Edition
matmul is an operation that computes matrix or batched tensor multiplication.
- How it is used
- Uses matrix products to describe geometric transforms and to perform lower-precision inference.
- How deep it goes
- Works through rotation and scaling, then details scaled int8 multiplication and output unscaling.
- Examples
- Uses 2D rotation and scaling, plus small matrices for an int8 quantization example.
- What you can do after
- Understand how scaling and unscaling let int8 matmul approximate a float32 result.
Read how Deep Learning with R, Third Edition explains matrix-matrix multiplication →
Deep Learning with Python, Third Edition
The linear-algebra operation that multiplies matrices or higher-rank tensors in a way that composes transformations.
- How it is used
- Deploys matrix multiplication as the core transformation inside dense neural-network layers and linear classifiers.
- How deep it goes
- Explains vector, matrix-vector, matrix-matrix, and higher-rank products with shapes and naive implementations, without deriving formal notation.
- Examples
- Uses NumPy vector and matrix implementations, a Dense-layer expression, and a PyTorch linear-model forward pass.
- What you can do after
- Apply it via NumPy, Keras, or PyTorch while checking operand shapes and interpreting the resulting dimensions.
Read how Deep Learning with Python, Third Edition explains matrix-matrix multiplication →
Related concepts
- tilinguses · Tiling is a technique that partitions data or computation into smaller blocks to improve memory locality, data reuse, and processing efficiency.
- projective transformationused by · A projective transformation is a mapping of projective-space points represented by homogeneous linear coordinates that preserves incidence but may not preserve parallelism.
- inner productuses · An inner product is a scalar-valued operation on two vectors that combines their corresponding components, summing their products and, for complex vectors, using conjugation.
- attentionused by · Attention is a neural-network mechanism that computes input-dependent weights to combine information according to its relevance to a computation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.







