This lecture provides an informal introduction to matrices and vectors.

A matrix is a two-dimensional array of numbers, having a fixed number of rows and columns, and containing a number at the intersection of each row and each column. A matrix is usually delimited by square brackets.

Example The following is an example of a matrix having two rows and two columns:

The number of rows and columns of a matrix constitute its dimension. If a matrix has rows and columns, we say that it is a matrix, or that it has dimension .

Example Define a matrixThe matrix has rows and columns. So, we say that is a matrix.

The numbers contained in a matrix are called elements of the matrix (or entries, or components). If is a matrix, the element at the intersection of row and column is usually denoted by (or ) and we say that it is the -th element of .

Example Let be a matrix defined as follows:The element of at the intersection of the third row and the first column, i.e., its -th element is

If a matrix has only one row or only one column it is called a vector.

A matrix having only one row is called a **row vector**.

Example The matrixis a row vector, because it has only one row.

A matrix having only one column is called a **column vector**.

Example The matrixis a column vector because it has only one column.

A matrix having only one row and one column is called a scalar.

Example The matrixis a scalar. In other words, a scalar is a single number.

Equality between matrices is defined in the obvious way. Two matrices and having the same dimension are said to be equal if and only if all their corresponding elements are equal to each other:

A matrix
is a **zero matrix** if all its elements are equal to zero, and
we write

Example If is a matrix and , then

A
matrix is called a **square matrix** if the number of its rows is
the same as the number of its columns, that is,
.

Example The matrixis a square matrix.

Example The matrixis a square matrix.

Let
be a square matrix. The **diagonal** (or main diagonal of
)
is the set of all elements
such that
.
The elements belonging to the diagonal are called diagonal elements, and all
other elements are called off-diagonal.

Example Let be the matrix defined byAll off-diagonal elements of are equal to , while the three diagonal elements are equal to , , and , respectively.

A square matrix is called an **identity matrix** if all its
diagonal elements are equal to
and all its off-diagonal elements are equal to
.
It is usually indicated by the letter
.

Example The matrixis the identity matrix.

If
is a
matrix, its **transpose**, denoted by
,
is the
matrix such that the
-th
element of
is equal to the
-th
element of
for
any
and
satisfying
and
.
In other words, the columns of
are equal to the rows of
(equivalently, the rows of
are equal to the columns of
).

Example Let be the matrix defined by Its transpose is the following matrix:

Example Let be the matrix defined by Its transpose is the following matrix:

A square matrix is said to be **symmetric** if it is equal to its
transpose.

Example Let be the matrix defined by Its transpose is the following matrix:which is equal to . Therefore, is symmetric.

Below you can find some exercises with explained solutions.

Let be a matrix defined byFind its transpose.

Solution

The transpose is a matrix such that its columns are equal to the rows of :

Let be a column vector defined byShow that its transpose is a row vector.

Solution

The transpose is a matrix such that its rows are equal to the columns of . But has only one column, which implies that has only one row. Therefore, it is a row vector:

Let be a matrix defined byIs it symmetric?

Solution

is symmetric if it is equal to its transpose. The transpose of iswhich is not equal to . Therefore, is not symmetric.

The book

Most of the learning materials found on this website are now available in a traditional textbook format.