Note: here are some details about matrices that haven't been addressed yet in the above writeups.

Matrices play a very important part in maths, particularly in the field of linear algebra. A bidimensional matrix is, as said above, a collection of numbers (or polynomials, or colours or anything you fancy) arranged in rows and columns like this:

+ 3 2 1 5 +
| 2 1 0 1 |
+ 1 0 2 1 +

(To get tridimensional matrices, you can stack bidimensional matrices of a same size and so forth)

The most common way to refer to matrices is with capital letters, especially A,B,C, ... or M. To represent individual cells of the matrix we use the matrix's name in lowercase and subscripts to indicate the row and column we are refering to. If we name the above matrix M, then m1 4 would be 5. The indexes i and j are often used to refer to general positions on the matrix, and the following notation is also used:

M=(mi j)

Matrix sizes are often expressed as NxM where N is the number of rows and M the number of columns.

Another common technique is to divide matrices into smaller matrices. For example, 4x4 matrices are used for tridimensional transforms. This 4x4 matrix is divided into 4 four parts like this:

+ R | T +
+ --+-- +
+ P | 1 +

Where R is a 3x3 which contains rotation, T is a 3x1 matrix that specifies a translation, P is a 1x3 matrix that performs perspective and 1 is well, a 1x1 1 :)

What does one use matrices for? They are an extremely compact way to express a lot of things. For example, a system of linear equations of the following form:

a1 1x1 + ... + a1 mxm = b1
a2 1x1 + ... + a2 mxm = b2
...
an 1x1 + ... + an mxm = bn

Can be represented with an NxM+1 matrix like this:

+ a11 a12 a13 ... a1m b1 +
| a21 a22 a23 ... a2m b2 |
|  .   .   .  .    .   . |
|  .   .   .   .   .   . |
|  .   .   .    .   .  . |
+ an1 an2 an3 ... anm bn +

The above representation lets us perform linear row operations quickly and saving ourselves for writing lots of x's, +'s and ='s.

As seen on the example before about splitting matrices, they are an essential tool for n-dimensional geometry. A vector or a point in an n-dimensional space can be represented using either row vectors or column vectors, that is, the vector's components laid out in an 1xN or Nx1 matrix. Using one additional dimension and putting an 1 as the last component, lets us write translation and rotation using homogenous transforms.

Of course, matrices have applications outside maths. Just remember that most tables are in fact matrices. A timetable is just a matrix over a subjects space!