A café sells small and large drinks at two branches. Put the day's sales in a table, with row 1 for the North branch, row 2 for the South branch, column 1 for small and column 2 for large: S=[40322518]. That grid is a matrix. It has 2 rows and 2 columns, so it is 2×2, and the entry s21=32 says the South branch sold 32 small drinks.
An entry's address gives the row first and the column second, the same order as the size. In A=[142536], which is 2×3, the entry a13 is 3 (row 1, column 3), while a31 does not exist because there is no third row. Rows run across; columns run down.
The shape carries meaning as well as the numbers. A single row such as [725] is a 1×3 matrix, also called a row vector, and a single column is an n×1 column vector. A matrix with as many rows as columns is square, and only square matrices have determinants and inverses.
Not every collection of numbers is a matrix. The point (3,4) is an ordered pair naming one location, not a grid. A layout with 3 numbers in the first row and 2 in the second is not a matrix either: every row must have the same length, or the column positions mean nothing.
Think of it like this. A matrix is like a theatre seating chart with no gaps: every seat has a row and a seat number, and you say the row first, so seat a23 is row 2, seat 3. Unlike a real theatre, a matrix cannot have a short back row; every row has exactly n seats.
Core idea. A matrix is a rectangular array where each entry is pinned by its row and column address.