A matrix is really just a fancy way of arranging numbers into a rectangular 2D array. Matrices are a very efficient and useful way of encoding information in certain cases, and are used extensively in linear algebra, computer graphics, machine learning, and more.

Here are some examples of some matrices:

Matrices can take any rectangular shape, where and are positive integers describing the number of rows and columns respectively. Note how (parentheses) and [square brackets] are more or less interchangeable - it’s just personal preference, really.

And if the last example there caught your eye for looking suspiciously like a vector, well spotted - that’s because all vectors can be considered an matrix as well!

Linear transformations

One of the things matrices are very good at describing is linear transformations - that being, some way to uniformly squash, stretch, scale or spin some space.

A two-dimensional linear transformation can be described in a matrix, a three-dimensional transformation with a matrix, and so on.

todo