This lecture provides an informal introduction to matrices and vectors.
A matrix is a two-dimensional array that has a fixed number of rows and columns and contains a number at the intersection of each row and column.
A matrix is usually delimited by square brackets.
Example Here is an example of a matrix having two rows and two columns:
If a matrix has rows and columns, we say that it has dimension , or that it is a matrix.
Example The matrixhas rows and columns. So, we say that is a matrix.
The numbers contained in a matrix are called entries of the matrix (or elements, or components).
If is a matrix, the entry at the intersection of row and column is usually denoted by (or ). We say that it is the -th entry of .
Example Let be a matrix defined as follows:The element of at the intersection of the third row and the first column, that is, its -th entry 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 entries such that .
The elements belonging to the diagonal are called diagonal elements, and all the other entries are called off-diagonal.
Example Let be the matrix defined byAll off-diagonal entries 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 by
Find its transpose.
The transpose is a matrix such that its columns are equal to the rows of :
Let be a column vector defined by
Show that its transpose is a row vector.
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 by
Is it symmetric?
is symmetric if it is equal to its transpose. The transpose of iswhich is not equal to . Therefore, is not symmetric.
Please cite as:
Taboga, Marco (2021). "Vectors and matrices", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/vectors-and-matrices.
Most of the learning materials found on this website are now available in a traditional textbook format.