Definitions & rules
A matrix is an ordered rectangular array of quantities. An array with rows and columns is called an matrix and is said to have elements. For example,
The position of an element in a matrix is specified uniquely by means of a double subscript. We denote the element in the -th row and the -th column of the matrix by . A shorthand notation is to write where and .
A matrix with is called a row vector, for example and a matrix with is called a column vector, for example .
Rules of matrix algebra
I. Addition and subtraction
Consider a matrix of size and a matrix of size . Then, can only exist if and , i.e. only if and have the same size. For example, determine the matrix if
The resulting matrix has the same size as and ; if the entries for the matrix are and for are , then the entries in are given by , as follows,
II. Equality
The matrices and are equal to each other, i.e. , iff for all and .
III. Multiplication by a scalar
If is a scalar, then i.e. every element of is multiplied by .
IV. Matrix multiplication
If is a row vector with elements given by
and is a column vector with elements given by
then the product, is defined to be a scalar given by
In general, if and , the product exists only if , i.e. only if
the number of columns of the number of rows of
If then the product (let us call it ) is an matrix:,
where in Eq. (10.4). For , we define the product as a matrix of size where,
Consider the matrices given by and as follows,
Suppose we want to determine the product . The number of columns of are equal to the number of rows of therefore we can proceed to determine the product . Since is a matrix and is matrix, the product, will be a matrix.
To obtain the product : - We multiply the first element in the first row of (i.e ) with the first element in the first column of (i.e. ) [these elements are shown in blue boxes]. We then multiply the second element in the first row of (i.e. ) with the second element in the first column of (i.e. ) [these elements are shown in red boxes]. The sum of these products is the first element in the product :
- So far we multiplied the first row of by the first column of . The sum is shown in green. Next, we multiply the first row of by the second column of :
- To complete the first row of the product , we multiply the first row of by the third column of :
- Repeating the above steps with the second and third rows of , yields,
Note that if , it does not necessarily follow that or or .
Properties of matrix multiplication
(i) Non-commutativity: in general, ; even if both and exist. If then and are said to commute.
(ii) Associativity: for matrices , and , we have
(iii) Distributive over matrix addition: For , and , we have
Special types of matrices
In this section, we take to be an matrix, i.e. .
Transpose of a matrix
Consider an matrix . The transpose of , denoted by is the (note the index letters have been switched) matrix whose rows are the columns of and whose columns are the rows of , i.e. . For example, if
then,
Note that the transpose of a matrix is also denoted as or .
I. Square matrices
If , then is called the square matrix of order or an -th order matrix. The elements are called the main diagonal elements of . Their sum is called the trace of , i.e.
II. Symmetric matrices
If , i.e. then is said to be a symmetric matrix. For example,
III. Skew-symmetric or anti-symmetric matrices
If , i.e. then is said to be a skew or anti-symmetric matrix. For example,
It follows that for such matrices.
Note that any square matrix can be written as the sum of a symmetric and an anti-symmetric matrix:
IV. Diagonal matrices
If where is called a diagonal matrix. For example,
Special cases of diagonal matrices include the identity and null matrices. If where and , then and is referred to as the identity matrix of order (note that throughout these notes we also denote the identity matrix simply by . For example,
If for all and then and is called the null or zero matrix.
V. Lower triangular matrix:
This is a matrix for which if , e.g.
VI. Upper triangular matrix:
This is a matrix for which if , e.g.
Inverse matrices
A square matrix of order has an inverse, say , if,
- If the inverse of exists, then it is unique;
- If exists, is called a non-singular matrix;
- If does not exist, is said to be singular.
The inverse of is denoted by so,
Shortcut for matrices
Given a matrix,
let
where the elements are unknown. From Eqs. (10.14), we have
and,
Equations (10.15) and (10.16) give us 8 scalar equations for the 4 unknowns , ). It can be found that there is a unique solution for such that:
Note that:
- the denominator in the first term on the RHS of (10.17) is the determinant of (see Section 10.2);
- the second term is the matrix with the position of the diagonals and switched while the positions of and remain the same but the elements are multiplied by -1 .
From (10.17), we can say that:
- has an inverse (i.e. it is non-singular) if ;
- is singular if . Example 10.1 If it exists, compute the inverse of the following matrix
Solution We first calculate the denominator of the fraction in Eq. (10.17),
We then switch the entries in the diagonals and multiply the entries in the off-diagonal by -1 so that we obtain the inverse as
It is always a good idea to check your answer using ,
Note that to find the inverse of a matrix higher than , we need knowledge of determinants, the matrix of minors, and the matrix of cofactors so we discuss inverses of larger matrices later in this chapter.
Orthogonal matrices
A square matrix with real entries and satisfying the condition is said to be orthogonal. Since computing the matrix inverse can be difficult while the transpose is straightforward, orthogonal matrices make a difficult operation easier. If , then is orthogonal. Consider a matrix and its transpose ,
Consider now the dot product of the and row vectors of [refer to Eq. (10.18)]; this is given by . For the product to be equal to the identity matrix, we deduce the following:
Denoting the row vector of by , we have
i.e. for and must be perpendicular or orthogonal and . If any two vectors in a set are orthogonal for all then they are said to be mutually orthogonal; further since , the row vectors of are mutually orthogonal unit vectors. Note that we also need which implies that the column vectors of must also be mutually orthogonal unit vectors.
Example 10.2 Show that the following matrix is orthogonal,
Solution The matrix is orthogonal iff Eq. (10.19) and equivalently Eq. (10.20) holds true. We define , and . Then,
and
Recall the dot product is commutative so the above proves that the rows of are mutually orthogonal vectors and therefore is an orthogonal matrix. It follows that,
Exercises
- Find both and of the following where possible: (a) and (b) and ; (c) and .
- Find decomposition of into symmetric and skew symmetric parts where,
- Find the inverse of the following matrices: (a) (b) .