Moving from vectors to matrices is the natural next step when you need to handle hundreds of objects at once, like multiple forces acting on a body or large datasets. A matrix in linear algebra is a rectangular grid of numbers organized into rows and columns, and understanding it as a collection of vectors unlocks how it powers everything from digital images to video game transformations.
What is a matrix and why think of it as a collection of vectors?
A matrix looks like a table, but the richer interpretation is seeing it as vectors stacked together. You can read it two ways: as row vectors piled one on top of another, or as column vectors placed side by side [0:35].
Take the matrix A = [[0, 1], [1, 0]]. You can break it down into the row vectors (0, 1) and (1, 0), or into the column vectors (0, 1) and (1, 0). Same numbers, different lens. This dual view becomes essential when you start operating on data later.
What is a matrix? A matrix is a rectangular arrangement of numbers in rows and columns that can be interpreted as a collection of vectors, either by rows or by columns.
How do you read the dimensions of a matrix?
The size of a matrix is written as m × n, where m counts the rows and n counts the columns [1:05]. The matrix above is 2 × 2 because it has two rows and two columns. A 3 × 2 matrix would have three rows and two columns, and so on.
Getting the order right matters. Rows always come first, columns second. Mix them up and your operations later will break.
Where do matrices show up in the real world?
Matrices are not just an abstract concept; they organize the information around you every day [1:25].
- A digital image is a giant matrix where each cell stores a number representing the brightness of a pixel.
- Any Excel spreadsheet is a matrix, with rows for products and columns for monthly sales, for example.
- In design software and video games, matrices act as machines that rotate, stretch or transform objects on screen.
That last point is worth holding onto. Matrices are not only containers; they are operators that change other objects.
What types of matrices should you recognize first?
Let's walk through a few concrete examples so the definitions stick.
What is a rectangular matrix?
Consider A = [[5, 1], [3, 4], [2, 0]] [2:00]. This one has three rows and two columns, so it is a 3 × 2 matrix. The number of rows and columns are different, which makes it rectangular.
What is a square matrix?
Now take B = [[2, 1], [3, 4]], with dimensions 2 × 2 [2:15]. A square matrix is one where the number of rows equals the number of columns, meaning m = n. A 3 × 3 or a 4 × 4 matrix also qualifies as square.
What makes a matrix square? It has the same number of rows and columns. Examples include 2 × 2, 3 × 3 and 4 × 4 matrices.
What is the identity matrix?
The identity matrix, written with the letter I, is a square matrix where the main diagonal is filled with ones and every other entry is zero [2:40]. For a 2 × 2 case, that means ones in the top-left and bottom-right positions, zeros elsewhere.
This matrix is known as the number one of linear algebra. The reason it earns that nickname becomes clear when you start multiplying matrices in later lessons, since multiplying by I leaves any matrix unchanged, just like multiplying a number by 1.
How can you practice with a 4 × 4 matrix?
Here is the exercise for this lesson: describe a real-world example of information you would organize in a 4 × 4 square matrix [3:15]. For a 2 × 2 or 3 × 3, you could track product sales over two or three months. How would you scale that idea to four rows and four columns? Share your answer in the comments.
Thinking through your own example forces you to internalize what rows and columns can represent, and that intuition pays off when you move into matrix operations.
You now know what a matrix is, how to read its dimensions, and how to spot rectangular, square and identity matrices. The next question is whether you can add, subtract and scale them the way you do with vectors. That answer comes in the next lesson.