Matrix
A matrix is a rectangular two-dimensional array of elements arranged in rows and columns.
Algorithms Every Programmer Should Know
A matrix is a rectangular array of values indexed by row and column.
- How it is used
- Stores best values by item count and capacity while solving 0/1 knapsack without repeating smaller calculations.
- How deep it goes
- Works through dimensions, zero boundaries, cell updates and a Python implementation; discusses one-dimensional space reduction without implementing it.
- Examples
- Traces cloud instances with costs and throughput values through a 5 × 9 grid, including cells T[2, 3] and T[4, 8].
- What you can do after
- Build it from scratch as a Python 0/1-knapsack table and read its final cell for the maximum value.
Read how Algorithms Every Programmer Should Know explains matrix →
HTML5 in Action
A matrix is a rectangular array of values used to represent transformations and other mathematical operations.
- How it is used
- Uses matrices with buffers to position and rotate 3D shapes for display in a WebGL drawing loop.
- How deep it goes
- Works through perspective, rotation, shape output, and helper utilities as parts of a drawing workflow.
- Examples
- Uses game entities, shape and color output, rotation data, and a drawing loop as examples.
- What you can do after
- Build 3D game entities with matrix data and draw their shapes through a WebGL engine.
Grokking GPU Programming
A matrix is a two-dimensional arrangement of elements organized by rows and columns.
- How it is used
- Uses matrix layouts to show how traversal direction affects memory access in CUDA.
- How deep it goes
- Compares row-major and column-major storage and traces warp accesses through row and column sums.
- Examples
- Uses row-sum and column-sum kernels to contrast strided and coalesced accesses.
- What you can do after
- Evaluate matrix traversal choices by checking whether warp threads access nearby addresses.
Also covered in
- GPU Programming with TritonIn early access (MEAP)
- Type-Driven Development with Idris
What to know first
- arrayAn array is an ordered collection of elements organized in one or more dimensions and accessible by position or index.
- cache lineA cache line is a fixed-size block of contiguous memory that a cache transfers or manages as a unit.
Related concepts
- tilehas part · A tile is a bounded block of elements from a larger array, matrix, or tensor that is treated as a unit of computation.
- matrix-matrix multiplicationused by · Matrix multiplication is an operation on compatible matrices in which each entry of the product is the dot product of a row of the first matrix and a column of the second.
- transpositionused by · Transposition is an operation that exchanges a matrix’s rows and columns or, more generally, permutes the axes of a multidimensional array.
- dependent typekind of · A dependent type is a type whose definition or parameters can depend on values or expressions.
Questions about matrix
What is matrix?
A matrix is a rectangular two-dimensional array of elements arranged in rows and columns.
Which Manning books explain matrix?
Algorithms Every Programmer Should Know, HTML5 in Action and Grokking GPU Programming.
What should I know before learning matrix?
Manning books that teach matrix usually introduce array and cache line first.
What kinds of matrix are there?
Kinds of matrix include sparse matrix and square cost matrix.
What is matrix a kind of?
Matrix is a kind of dependent type. A dependent type is a type whose definition or parameters can depend on values or expressions.
What are the parts of matrix?
Matrix includes tile.
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.


