You are already familiar with vectors, which are an array of numbers. Matrices are a rectangular array of numbers. The following is an example of a matrix:

    equation

This matrix has 2 rows and 3 columns. Therefore it is called a 2×3 matrix. A vector can be considered a special case of a matrix that has only one column. In general a matrix looks like this:

    equation

where equation is the entry in row equation and column equation. This matrix has equation rows and equation columns.

In the following, we describe different special kinds of matrices and other terminology.

Square matrix
A matrix that has the same number of rows as columns (equation) is called a square matrix. For example, the following is a square matrix:

    equation

Diagonal
The entries equation (equation, equation, …, equation) are said to be on the diagonal. All other entries are off-diagonal. The following is an example of a matrix that non-zero entries on the diagonal and all off-diagonal entries are zero:

    equation

Such a matrix that contains many zeros can be abbreviated as:

    equation

Identity matrix
A matrix where all off-diagonal entries are zero, and all diagonal entries are one is called an identity matrix:

    equation

Triangular matrix
A matrix where all entries below or above the diagonal are zero is said to be triangular. If all entries below are zero, it is called upper triangular. If all entries above are zero, it is called lower triangular. This is an example of an upper triangular matrix:

    equation

Operations with matrices

For more information on how to calculate with matrices, please refer to the following articles: