Definition:Matrix

Definition
Let $$m, n \in \Z_+$$, and let $$S$$ be a set.

An $$m \times n$$ matrix over $$S$$ (plural: matrices, said $$m$$ times $$n$$ or $$m$$ by $$n$$) is a mapping from $$\left[{1 \,. \, . \, m}\right] \times \left[{1 \,. \, . \, n}\right]$$ into $$S$$.

When the set $$S$$ is understood, or for the purpose of the particular argument irrelevant, we can refer just to an $$m \times n$$ matrix.

The convention is for the variable representing the matrix itself to be represented in $$\mathbf{boldface}$$.

A matrix is frequently written as a rectangular array, and when reference is being made to how it is written down, will sometimes be called an array.

For example, let $$\mathbf A$$ be an $$m \times n$$ matrix. This can be written as the following array:


 * $$\mathbf A = \begin{bmatrix}

a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \\ \end{bmatrix} $$

Thus an $$m \times n$$ matrix has $$m$$ rows and $$n$$ columns.

Note that no commas are placed between elements in the rows. It needs to be understood that, when writing a matrix, it pays to leave sufficient space between the elements for the columns to be distinct.

An $$m \times n$$ matrix can also be written as $$\mathbf A = \left[{a}\right]_{m n}$$, where the subscripts $$m$$ and $$n$$ denote respectively the number of rows and the number of columns in the matrix.

Arrays may also be conveniently represented on the page by placing symbols together that denote other matrices.

For example, let $$\mathbf A = \left[{a}\right]_{m n}, \mathbf B = \left[{b}\right]_{m p}, \mathbf C = \left[{c}\right]_{r n}, \mathbf D = \left[{d}\right]_{r p}$$.

We can create the $$\left({m + r}\right) \times \left({n + p}\right)$$ matrix $$\mathbf M = \begin{bmatrix} \mathbf A & \mathbf B \\ \mathbf C & \mathbf D \end{bmatrix}$$.

It is clear that the dimensions of the component matrices must be compatible for this construct to be defined.

Lines may if desired be drawn between rows and columns of an array in order to clarify its sections.

Dimensions
Let $$\left[{a}\right]_{m n}$$ be an $$m \times n$$ matrix.

Then the parameters $$m$$ and $$n$$ are known as the dimensions of the matrix.

Row
Let $$\mathbf A$$ be an $$m \times n$$ matrix.

For each $$i \in \left[{1 \,. \, . \, m}\right]$$, the rows of the matrix are the ordered $n$-tuples $$r_i = \left({a_{i 1}, a_{i 2}, \ldots, a_{i n}}\right)$$

where $$r_i$$ is called the $$i$$'th row of $$\mathbf A$$.

A row of an $$m \times n$$ matrix can also be treated as a $1 \times n$row matrix in its own right:


 * $$r_i = \begin{bmatrix}

a_{i 1} & a_{i 2} & \cdots & a_{i n} \end{bmatrix}$$ for $$i = 1, 2, \ldots, m$$.

Column
Let $$\mathbf A$$ be an $$m \times n$$ matrix.

For each $$j \in \left[{1 \,. \, . \, n}\right]$$, the columns of the matrix are the ordered $m$-tuples $$c_j = \left({a_{1 j}, a_{2 j}, \ldots, a_{m j}}\right)$$

where $$c_j$$ is called the $$j$$'th column of $$\mathbf A$$.

A column of an $$m \times n$$ matrix can also be treated as a $m \times 1$ column matrix in its own right:


 * $$c_j = \begin{bmatrix}

a_{1 j} \\ a_{2 j} \\ \vdots \\ a_{m j} \end{bmatrix}$$ for $$j = 1, 2, \ldots, n$$.

Element
Let $$\mathbf A$$ be an $$m \times n$$ matrix.

The individual $$m \times n$$ elements of $$S$$ that go to form the matrix $$\mathbf A = \left[{a}\right]_{m n}$$ are known as the elements of the matrix.

The element at row $$i$$ and column $$j$$ is called element $$\left({i, j}\right)$$ of the matrix, and can be written $$a_{i j}$$, or $$a_{i, j}$$ if $$i$$ and $$j$$ are more complicated coefficients and more clarity is needed.

Note that the first subscript determines the row, and the second the column, of the matrix where the element is positioned.

Square Matrix
An $$n \times n$$ matrix is called a square matrix of order $$n$$.

A square matrix $$\left[{a}\right]_{n n}$$ is usually denoted $$\left[{a}\right]_{n}$$.

In contrast, a non-square matrix can be referred to as a rectangular matrix.

Diagonal Elements
Let $$\mathbf A = \left[{a}\right]_{n}$$ be a square matrix.

The elements $$a_{j j}: j \in \left[{1 \,. \, . \, n}\right]$$ constitute the principal diagonal or main diagonal of the matrix, and the elements themselves are called the diagonal elements.

Zero Row or Column
If a row or column contains only zeroes, then it is a zero row or a zero column.

Underlying Structure
Let $$\mathbf A$$ be a matrix over a set $$S$$.

The set $$S$$ can be referred to as the underlying set of $$\mathbf A$$.

In the context of matrices, however, it is usual for $$S$$ itself to be the underlying set of an algebraic structure in its own right. If this is the case, then the structure $$\left({S, \circ_1, \circ_2, \ldots, \circ_n}\right)$$ (which may also be an ordered structure) can be referred to as the underlying structure of $$\mathbf A$$.

Matrices themselves, when over an algebraic structure, may themselves have operations defined on them which are induced by the operations of the structures over which they are formed.

However, because the concept of matrices was originally developed for use over the standard number fields ($$\Z$$, $$\R$$ etc.), the language used to define their operations (i.e. "addition", "multiplication", etc.) tends to relate directly to such operations on those underlying number fields.

The concept of the matrix can be extended to be used over more general structures than these, and it needs to be borne in mind that although the matrix operations as standardly defined may bear the names of those familiar "numerical" operations, those of the underlying structure may not necessarily be so.

Comment
Some older sources, use the term array instead of matrix, but see above: the usual convention nowadays is to reserve the term array for the written-down denotation of a matrix.

The notation $$\mathbf A = \left[{a}\right]_{m n}$$ is a notation which is not yet seen frequently. $$\mathbf A = \left({a_{i j}}\right)_{m \times n}$$ or $$\mathbf{A} = \left({a_{i j}}\right)$$ are more common. However, the notation $$\left[{a}\right]_{m n}$$ is gaining in popularity because it better encapsulates the actual dimensions of the matrix itself in the notational form.

Some sources use round brackets to encompass the array, thus:


 * $$\mathbf A = \begin{pmatrix}

a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \\ \end{pmatrix} $$

Which is used is ultimately no more than a matter of taste.

When writing a row or column matrix as an array, we usually don't bother to write the index of the row (for the row matrix) or column (for the column matrix), as it is understood that it is indeed $$1$$.