# Matrix

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

**Field:** General Knowledge  
**Category:** Math & Statistics  
**Also known as:** Matrices

## Think of it like

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

## 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.

## 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.

## Common mistake

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

## Three principles

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

## Related terms

- [Vector](https://learn.benibix.com/term/general/vector)
- [Tensor](https://learn.benibix.com/term/general/tensor)
- [Dot Product](https://learn.benibix.com/term/general/dot-product)
- [Graphics Processing Unit (GPU)](https://learn.benibix.com/term/infrastructure/graphics-processing-unit)

![Three shapes of numbers. A vector is one row of numbers. A matrix is a grid of rows and columns. A tensor is a stack of grids, like pages.](https://learn.benibix.com/diagrams/math-vector-matrix-tensor.svg)

---

Source: https://learn.benibix.com/term/general/matrix
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
