liveBook · Manning

Matrix

Also called matrices

A matrix is a rectangular two-dimensional array of elements arranged in rows and columns.

How 3 Manning books explain it

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.

Read how HTML5 in Action explains matrix →

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.

Read how Grokking GPU Programming explains matrix →

Also covered in

What to know first

Related concepts

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.