Skip to content
BENIBIX Learn

Matrix

General🔢 Math & StatisticsLinear Algebra

Also known as Matrices

A grid of numbers in rows and columns. Neural networks are full of them.

Think of it like

Think of it like a box of chocolates. It has rows and columns of spots.

Example

Jack's table of 4 houses and 3 facts is a 4 by 3 matrix. It holds 12 numbers in all.

Why it matters

Most of the math inside AI is matrix math. That is why AI runs fast on chips built for it.

Definition

A matrix is a grid of numbers set out in rows and columns. A table of house prices, with one row per house and one column per fact, is a matrix. A matrix can also act on a vector and turn it into a new vector. Neural networks store their weights in matrices and do most of their work by multiplying them. Graphics chips are built to do this very fast.
A matrix is the grid in the middle: rows of the same length, stacked.

Common mistake

Thinking you can multiply any two matrices. The rows and columns have to line up, or the sum does not work.

Key takeaways

  1. 1
    Rows and columns. A grid of numbers.
  2. 2
    Stores weights. Each layer holds one or more.
  3. 3
    Multiplied a lot. The core job of AI chips.