Preliminary Mathematics for online MSc programmes in Data AnalyticsUnit 6: Vectors and Matrices

Vectors

Introduction to vectors

A vector is an ordered set of numbers. These could be expressed as a row Start 1 By 5 Matrix 1st Row 1st Column 6 2nd Column 0 3rd Column 5 4th Column ellipsis 5th Column 1 EndMatrix comma or as a column Start 5 By 1 Matrix 1st Row 6 2nd Row 0 3rd Row 5 4th Row vertical ellipsis 5th Row 1 EndMatrix period The number of elements in a vector is referred to as its dimension. An n-dimensional vector can be represented as a row vector.

We use subscripts to denote the individual entries of a vector x Subscript i denotes the i-th entry of the vector bold x. If we had called the above vector bold x then x left bracket 3 right bracket equals 5.

Operations on vectors

As a matter of definition, when we add two vectors, we add them element by element. If bold x equals Start 5 By 1 Matrix 1st Row x 1 2nd Row x 2 3rd Row x 3 4th Row vertical ellipsis 5th Row x Subscript n Baseline EndMatrix and bold y equals Start 5 By 1 Matrix 1st Row y 1 2nd Row y 2 3rd Row y 3 4th Row vertical ellipsis 5th Row y Subscript n Baseline EndMatrix comma we then have that bold x plus bold y equals Start 5 By 1 Matrix 1st Row x 1 plus y 1 2nd Row x 2 plus y 2 3rd Row x 3 plus y 3 4th Row vertical ellipsis 5th Row x Subscript n Baseline plus y Subscript n Baseline EndMatrix period

Scalar multiplication is an operation that takes a number (or scalar) gamma and a vector bold x and produces gamma dot bold x equals Start 5 By 1 Matrix 1st Row gamma dot x 1 2nd Row gamma dot x 2 3rd Row gamma dot x 3 4th Row vertical ellipsis 5th Row gamma dot x Subscript n Baseline EndMatrix period

The difference bold x minus bold y can be written as bold x plus left parenthesis negative 1 right parenthesis dot bold y. Thus we need to multiply the second vector with negative 1 and then add the two vectors.

A null vector is a vector whose elements are all zero. The difference between any vector and itself yields the null vector.

A unit vector is a vector whose length or modulus is 1, i.e. StartRoot sigma summation Underscript i equals 1 Overscript n Endscripts x Subscript i Superscript 2 Baseline equals 1 EndRoot.

Linear combination of vectors

Given n-vectors, bold x\ bold y and bold z, as well as scalars gamma and delta, we say that bold z is a linear combination of bold x and bold y if bold z equals gamma bold x plus delta bold y.

Specifically, for column vectors we have gamma dot bold x plus delta dot bold y equals Start 5 By 1 Matrix 1st Row gamma dot x 1 plus delta dot y 1 2nd Row gamma dot x 2 plus delta dot y 2 3rd Row gamma dot x 3 plus delta dot y 3 4th Row vertical ellipsis 5th Row gamma dot x Subscript n Baseline plus delta dot y Subscript n Baseline EndMatrix period

Inner product of vectors

Given two n-vectors, bold x and bold y, their inner product (sometimes called the dot product) is given by bold x dot bold y equals x 1 dot y 1 plus x 2 dot y 2 plus ellipsis plus x Subscript n Baseline dot y Subscript n Baseline equals sigma summation Underscript i equals 1 Overscript n Endscripts x Subscript i Baseline dot y Subscript i Baseline period

Orthogonality of vectors

Two vectors are said to be orthogonal if their inner product is zero.

Norm of a vector

The square-root of the inner product of a vector bold x and itself is called the norm of a vector:

StartMetric bold italic x EndMetric equals StartRoot bold italic x dot bold italic x EndRoot equals StartRoot sigma summation Underscript i equals 1 Overscript n Endscripts x Subscript i Superscript 2 Baseline EndRoot

Linear (in)dependence of vectors

  • A set of vectors is linearly independent if no vector in the set is (a) a scalar multiple of another vector in the set or (b) a linear combination of other vectors in the set.

  • A set of vectors is linearly dependent if any vector in the set is (a) a scalar multiple of another vector in the set or (b) a linear combination of other vectors in the set.

Example 1

StartLayout 1st Row 1st Column a 2nd Column equals Start 1 By 3 Matrix 1st Row 1st Column 1 2nd Column 2 3rd Column 3 EndMatrix 3rd Column b 4th Column equals Start 1 By 3 Matrix 1st Row 1st Column 4 2nd Column 5 3rd Column 6 EndMatrix 5th Column c 6th Column equals Start 1 By 3 Matrix 1st Row 1st Column 5 2nd Column 7 3rd Column 9 EndMatrix 2nd Row 1st Column d 2nd Column equals Start 1 By 3 Matrix 1st Row 1st Column 2 2nd Column 4 3rd Column 6 EndMatrix 3rd Column e 4th Column equals Start 1 By 3 Matrix 1st Row 1st Column 0 2nd Column 1 3rd Column 0 EndMatrix 5th Column f 6th Column equals Start 1 By 3 Matrix 1st Row 1st Column 0 2nd Column 0 3rd Column 1 EndMatrix EndLayout Note that:

  • Vectors a and b are linearly independent, because neither vector is a scalar multiple of the other.

  • Vectors a and d are linearly dependent, because d is a scalar multiple of a; since d equals 2 a.

  • Vector c is a linear combination of vectors a and b, because c equals a plus b. Therefore, the set of vectors a comma b, and c is linearly dependent.

  • Vectors d comma e, and f are linearly independent, since no vector in the set can be derived as a scalar multiple or a linear combination of any other vectors in the set.


Tasks
Task 1

Find the vector 2 bold italic u minus bold italic v when bold italic u equals Start 3 By 1 Matrix 1st Row negative 2 2nd Row 3 3rd Row 5 EndMatrix and bold italic v equals Start 3 By 1 Matrix 1st Row 0 2nd Row negative 4 3rd Row 7 EndMatrix.

Show answer

VideoVideo model answersDuration0:37

2 bold italic u minus bold italic v equals Start 3 By 1 Matrix 1st Row 2 times left parenthesis negative 2 right parenthesis minus 4 2nd Row 2 times 3 minus left parenthesis negative 4 right parenthesis 3rd Row 2 times 5 minus 7 EndMatrix Start 3 By 1 Matrix 1st Row negative 4 2nd Row 10 3rd Row 3 EndMatrix

Task 2

Are the following vectors orthogonal?

(a) bold italic u equals StartBinomialOrMatrix 1 Choose 2 EndBinomialOrMatrix and bold italic v equals StartBinomialOrMatrix 2 Choose negative 1 EndBinomialOrMatrix (b) bold italic u equals StartBinomialOrMatrix 3 Choose negative 1 EndBinomialOrMatrix and bold italic v equals StartBinomialOrMatrix 7 Choose 5 EndBinomialOrMatrix

Show answer

VideoVideo model answers for part (b)Duration0:51

(a) bold italic u dot bold italic v equals u 1 times v 1 plus u 2 times v 2 equals 1 times 2 plus 2 times left parenthesis negative 1 right parenthesis equals 0, therefore orthogonal. (b) bold italic u dot bold italic v equals u 1 times v 1 plus u 2 times v 2 equals 3 times 7 plus left parenthesis negative 1 right parenthesis times 5 equals 16 not equals 0, therefore not orthogonal.

Task 3

Find the value of n such that the vectors bold italic u equals Start 3 By 1 Matrix 1st Row 2 2nd Row 4 3rd Row 1 EndMatrix and bold italic v equals Start 3 By 1 Matrix 1st Row n 2nd Row 1 3rd Row negative 8 EndMatrix are orthogonal.

Show answer

VideoVideo model answers for part (b)Duration1:06

We want

bold italic u dot bold italic v equals u 1 times v 1 plus u 2 times v 2 plus u 3 times v 3 equals 2 times n plus 4 times 1 plus 1 times negative 8 equals 2 n minus 4 equals 0

Hence we have to set n equals four halves equals 2.

Self-help


Matrix algebra

Introduction to matrix algebra

A matrix is a rectangular array of numbers bold italic upper A equals Start 4 By 5 Matrix 1st Row 1st Column x 11 2nd Column x 12 3rd Column x 13 4th Column ellipsis 5th Column x Subscript 1 n Baseline 2nd Row 1st Column x 21 2nd Column x 22 3rd Column x 23 4th Column ellipsis 5th Column x Subscript 2 n Baseline 3rd Row 1st Column ellipsis 2nd Column ellipsis 3rd Column ellipsis 4th Column ellipsis 5th Column ellipsis 4th Row 1st Column x Subscript m Baseline 1 Baseline 2nd Column x Subscript m Baseline 2 Baseline 3rd Column x Subscript m Baseline 3 Baseline 4th Column ellipsis 5th Column x Subscript m n Baseline EndMatrix period

The notational subscripts in the typical element x Subscript i j refer to its row and column location in the array: specifically, x Subscript i j is the element in the i-th row and the j-th column. This matrix has m rows and n columns, so is said to be of dimension m times n. A matrix can be viewed as a set of column vectors, or alternatively as a set of row vectors. A vector can be viewed as a matrix with only one row or column.

Some special matrices
  • A matrix with the same number of rows as columns is said to be a square matrix.

  • Matrices that are not square are said to be rectangular matrices.

  • A null matrix is composed of all 0's and can be of any dimension.

  • An identity matrix is a square matrix with 1's on the main diagonal, and all other elements equal to 0. Formally, we have x Subscript i i Baseline equals 1 for all i and x Subscript i j Baseline equals 0 for all i not equals j. Identity matrices are often denoted by the symbol bold italic upper I (or sometimes as bold italic upper I Subscript n where n denotes the dimension). The three-dimensional identity matrix is bold italic upper I 3 equals Start 3 By 3 Matrix 1st Row 1st Column 1 2nd Column 0 3rd Column 0 2nd Row 1st Column 0 2nd Column 1 3rd Column 0 3rd Row 1st Column 0 2nd Column 0 3rd Column 1 EndMatrix period

  • A square matrix is said to be symmetric if x Subscript i j Baseline equals x Subscript j i.

  • A diagonal matrix is a square matrix whose non-diagonal entries are all zero. That is x Subscript i j Baseline equals 0 for i not equals j.

  • An upper-triangular matrix is a square matrix in which all entries below the diagonal are 0. That is x Subscript i j Baseline equals 0 for i greater than j.

  • A lower-triangular matrix is a square matrix in which all entries above the diagonal are 0. That is x Subscript i j Baseline equals 0 for i less than j.

Matrix operations
  • Matrices bold italic upper A and bold italic upper B are equal if and only if they have the same dimensions and if each element of bold italic upper A equals the corresponding element of bold italic upper B.

  • For any matrix bold italic upper A, the transpose, denoted by bold italic upper A Superscript intercalate (or bold italic upper A prime) is obtained by interchanging rows and columns. That is, the i-th row of the original matrix forms the i-th column of the transpose matrix. Note that if bold italic upper A is of dimension m times n, its transpose is of dimension n times m. Finally the transpose of a transpose of a matrix will yield the original matrix, i.e. backslash left parenthesis bold italic upper A Superscript intercalate Baseline backslash right parenthesis Superscript intercalate Baseline equals bold italic upper A.

  • We can add two matrices as long as they are of the same dimension. Let's assume that we have matrices bold italic upper A and bold italic upper B of dimension m times n; their sum is defined as an m times n matrix bold italic upper C equals bold italic upper A plus bold italic upper B. For instance, bold italic upper A plus bold italic upper B equals Start 2 By 2 Matrix 1st Row 1st Column x 11 2nd Column x 12 2nd Row 1st Column x 21 2nd Column x 22 EndMatrix plus Start 2 By 2 Matrix 1st Row 1st Column y 11 2nd Column y 12 2nd Row 1st Column y 21 2nd Column y 22 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column x 11 plus y 11 2nd Column x 12 plus y 12 2nd Row 1st Column x 21 plus y 21 2nd Column x 22 plus y 22 EndMatrix

  • The transpose of a sum of matrices is the sum of the transpose matrices i.e. backslash left parenthesis bold italic upper A plus bold italic upper B backslash right parenthesis Superscript intercalate Baseline equals bold italic upper A Superscript intercalate Baseline plus bold italic upper B Superscript intercalate.

  • Multiplying the matrix by a scalar involves multiplying each element of the matrix by that scalar.

Example 2

Transpose of a matrix

The transpose of the matrix bold upper A equals Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 2 2nd Row 1st Column 3 2nd Column 4 EndMatrix is

bold upper A Superscript intercalate Baseline equals Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 2 2nd Row 1st Column 3 2nd Column 4 EndMatrix Superscript intercalate Baseline equals Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 3 2nd Row 1st Column 2 2nd Column 4 EndMatrix

Matrix multiplication

Matrix multiplication is an operation on pairs of matrices that satisfy certain restrictions. The restriction is that the first matrix must have the same number of columns as the number of rows in the second matrix. When this condition holds the matrices are said to be conformable under multiplication. Let bold italic upper A be an m times n matrix and bold italic upper B an n times p matrix. As the number of columns in the first matrix and the number of rows in the second both equal n, the matrices are conformable.

The product matrix bold italic upper C equals bold italic upper A dot bold italic upper B is an m times p matrix whose i j-th element equals the inner product of the i-th row vector of the matrix bold italic upper A and the j-th column of matrix bold italic upper B.

Example 3

Multiplication of matrices

Consider the matrices

StartLayout 1st Row 1st Column bold italic upper A 2nd Column equals Start 2 By 3 Matrix 1st Row 1st Column 2 2nd Column 1 3rd Column 1 2nd Row 1st Column 1 2nd Column 2 3rd Column 3 EndMatrix 3rd Column bold italic upper B equals Start 3 By 2 Matrix 1st Row 1st Column 1 2nd Column 3 2nd Row 1st Column 2 2nd Column 1 3rd Row 1st Column 1 2nd Column 0 EndMatrix EndLayout

Suppose we want to calculate bold italic upper A bold italic upper B. The matrices are conformal, as the number of rows of bold italic upper A (2) matches the number of columns of the matrix bold italic upper B (also 2).

bold italic upper A dot bold italic upper B equals Start 2 By 3 Matrix 1st Row 1st Column 2 2nd Column 1 3rd Column 1 2nd Row 1st Column 1 2nd Column 2 3rd Column 3 EndMatrix dot Start 3 By 2 Matrix 1st Row 1st Column 1 2nd Column 3 2nd Row 1st Column 2 2nd Column 1 3rd Row 1st Column 1 2nd Column 0 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 2 dot 1 plus 1 dot 2 plus 1 dot 1 2nd Column 2 dot 3 plus 1 dot 1 plus 1 dot 0 2nd Row 1st Column 1 dot 1 plus 2 dot 2 plus 3 dot 1 2nd Column 1 dot 3 plus 2 dot 1 plus 3 dot 0 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 5 2nd Column 7 2nd Row 1st Column 8 2nd Column 5 EndMatrix period

Note that matrix multiplication is not commutative. The matrix product bold italic upper B bold italic upper A is also conformal (number of columns of bold italic upper B (3) matches the number of rows of bold italic upper A (also 3)), but the product bold italic upper B bold italic upper A not only contain different numbers from the product bold italic upper A bold italic upper B, it even has a different dimension!

bold italic upper B dot bold italic upper A equals Start 3 By 2 Matrix 1st Row 1st Column 1 2nd Column 3 2nd Row 1st Column 2 2nd Column 1 3rd Row 1st Column 1 2nd Column 0 EndMatrix dot Start 2 By 3 Matrix 1st Row 1st Column 2 2nd Column 1 3rd Column 1 2nd Row 1st Column 1 2nd Column 2 3rd Column 3 EndMatrix equals Start 0 By 0 Matrix EndMatrix equals Start 3 By 3 Matrix 1st Row 1st Column 1 dot 2 plus 3 dot 1 2nd Column 1 dot 1 plus 3 dot 2 3rd Column 1 dot 1 plus 3 dot 3 2nd Row 1st Column 2 dot 2 plus 1 dot 1 2nd Column 2 dot 1 plus 1 dot 2 3rd Column 2 dot 1 plus 1 dot 3 3rd Row 1st Column 1 dot 2 plus 0 dot 1 2nd Column 1 dot 1 plus 0 dot 2 3rd Column 1 dot 1 plus 0 dot 3 EndMatrix equals Start 3 By 3 Matrix 1st Row 1st Column 5 2nd Column 7 3rd Column 10 2nd Row 1st Column 5 2nd Column 4 3rd Column 5 3rd Row 1st Column 2 2nd Column 1 3rd Column 1 EndMatrix

Properties of matrix multiplication
  • Even when matrices bold italic upper A and bold italic upper B are conformable so that bold italic upper A bold dot bold italic upper B exists, bold italic upper B bold dot bold italic upper A may not exist.

  • Even when both product matrices exist, they may not have the same dimensions.

  • Even when both product matrices are of the same dimension, they may not be equal.

  • If bold italic upper A bold dot bold italic upper B=bold 0; that does not imply either bold italic upper A equals bold 0 or bold italic upper B equals bold 0 (as it would in the case of multiplying scalars).

  • If bold italic upper A bold dot bold italic upper B equals bold italic upper A bold dot bold italic upper C and bold italic upper A not equals bold 0, that does not imply bold italic upper B equals bold italic upper C.

  • Matrix multiplication is associative: left parenthesis bold italic upper A bold dot bold italic upper B right parenthesis dot bold italic upper C equals bold italic upper A dot left parenthesis bold italic upper B bold dot bold italic upper C right parenthesis period

  • Matrix multiplication is distributive across sums: StartLayout 1st Row 1st Column bold italic upper A dot left parenthesis bold italic upper B plus bold italic upper C right parenthesis 2nd Column equals bold italic upper A bold dot bold italic upper B plus bold italic upper A bold dot bold italic upper C 2nd Row 1st Column left parenthesis bold italic upper B plus bold italic upper C right parenthesis dot bold italic upper A 2nd Column equals bold italic upper B bold dot bold italic upper A plus bold italic upper C bold dot bold italic upper A period EndLayout

  • Multiplication with the identity matrix yields the original matrix.

  • Multiplication with the null matrix yields a null matrix.

  • If bold italic upper A is a square matrix we can multiply the matrix by itself and get bold italic upper A squared equals bold italic upper A bold dot bold italic upper A. Similarly, we get bold italic upper A Superscript n Baseline equals ModifyingBelow bold italic upper A bold dot bold italic upper A bold dot bold ellipsis bold dot bold italic upper A With bottom brace Underscript n times Endscripts.

  • A square matrix bold italic upper A is said to be idempotent if bold italic upper A bold dot bold italic upper A equals bold italic upper A.

  • From now on, we will refer to the product of two matrices, bold italic upper A and bold italic upper B, as bold italic upper A bold italic upper B and drop the dot notation.

Linear dependence and rank

  • The rank of a matrix is the number of linearly independent rows (or columns) in the matrix.
  • It doesn't matter whether you work with the rows or the columns.
  • The rank cannot be larger than the smaller of the number of rows and columns of a matrix. In other words, for an m times n matrix, i.e. a matrix with m rows and n columns, the maximum rank of the matrix is m if m less than or equals n, or n if n less than m.
  • If the rank is equal to the smaller of the number of rows and columns the matrix is said to be of full rank

The rank of a matrix can be interpreted as the dimension of the linear space spanned by the columns (or rows) of the matrix.

Example 4

Find the rank of the matrix by looking at both rows and columns.

Start 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column 1 2nd Column 1 3rd Column 0 2nd Row 1st Column 1 2nd Column 1 3rd Column 0 3rd Row 1st Column 1 2nd Column 0 3rd Column 1 4th Row 1st Column negative 1 2nd Column 0 3rd Column negative 1 EndLayout EndMatrix period

The second row is a copy of the first row and the fourth row is a scalar (-1) multiple of the third row. The first and third row however are linearly independent, hence the rank of the matrix must be 2.

We obtain the same answer by looking at the columns. The first two columns are linearly independent, but the first column is the sum of the second and the third column, hence it is not linearly independent. Thus, the rank of the matrix must be 2.

If we define the matrix bold italic upper C equals bold italic upper A bold italic upper B as the product of the matrices bold italic upper A and bold italic upper B, then

*the rank of bold italic upper C cannot be larger than the rank of bold italic upper A or the rank of bold italic upper B.

  • if bold italic upper A and bold italic upper B are of full rank then the rank of bold italic upper C is the smaller of the rank of bold italic upper A and the rank of bold italic upper B.

Determinant

Calculating determinants of 2x2 matrices

The determinant of a square n times n matrix bold italic upper A is a one-dimensional measurement of the "volume" of a matrix.

det left parenthesis Start 2 By 2 Matrix 1st Row 1st Column a 2nd Column b 2nd Row 1st Column c 2nd Column d EndMatrix right parenthesis equals Start 2 By 2 Determinant 1st Row a b 2nd Row c d EndDeterminant equals a d minus b c period Note that there are two ways to denote the determinant of a matrix bold italic upper A. That is det left parenthesis bold italic upper A right parenthesis or StartAbsoluteValue bold italic upper A EndAbsoluteValue.

Example 5

The determinant of the matrix bold italic upper A equals Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 0 2nd Row 1st Column 1 2nd Column 1 EndMatrix is

det left parenthesis Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 0 2nd Row 1st Column 1 2nd Column 1 EndMatrix right parenthesis equals Start 2 By 2 Determinant 1st Row 2 0 2nd Row 1 1 EndDeterminant equals 2 times 1 minus 0 times 1 equals 2

In general, one can show that the absolute value of the determinant of a matrix bold italic upper A is the volume of the parallelepiped spanned by its columns. In our example the (absolute value of the) determinant is the surface of the parallelogram spanned by the vectors StartBinomialOrMatrix 2 Choose 1 EndBinomialOrMatrix and StartBinomialOrMatrix 0 Choose 1 EndBinomialOrMatrix, i.e. the parallelogram with vertices in the points StartBinomialOrMatrix 0 Choose 0 EndBinomialOrMatrix, StartBinomialOrMatrix 2 Choose 1 EndBinomialOrMatrix, StartBinomialOrMatrix 2 Choose 1 EndBinomialOrMatrix plus StartBinomialOrMatrix 0 Choose 1 EndBinomialOrMatrix equals StartBinomialOrMatrix 2 Choose 2 EndBinomialOrMatrix and StartBinomialOrMatrix 0 Choose 1 EndBinomialOrMatrix.

Figure 1

There is also a closed-form formula for the determinant of a 3 times 3 matrix. Beyond dimension three there are no simple formulae. However if the matrix bold italic upper A is diagonal, then the determinant is simply the product of the diagonal elements of the matrix.

Calculating determinants of 3x3 matrices

The determinant of a 3 times 3 matrix bold italic upper A, is defined as StartAbsoluteValue bold italic upper A EndAbsoluteValue equals Start 3 By 3 Determinant 1st Row 1st Column upper A 11 2nd Column upper A 12 3rd Column upper A 13 2nd Row 1st Column upper A 21 2nd Column upper A 22 3rd Column upper A 23 3rd Row 1st Column upper A 31 2nd Column upper A 32 3rd Column upper A 33 EndDeterminant equals upper A 11 dot left parenthesis upper A 22 dot upper A 33 minus upper A 23 dot upper A 32 right parenthesis minus upper A 12 dot left parenthesis upper A 21 dot upper A 33 minus upper A 23 dot upper A 31 right parenthesis plus upper A 13 dot left parenthesis upper A 21 dot upper A 32 minus upper A 22 dot upper A 31 right parenthesis period

Supplement 1

Higher-order determinants

These operations can be represented more conveniently using the notion of minors. For any square matrix bold italic upper A, consider the sub-matrix bold italic upper A Subscript left parenthesis i j right parenthesis formed by deleting the i-th row and j-th column of bold italic upper A. The determinant of the sub-matrix bold italic upper A Subscript left parenthesis i j right parenthesis is called the left parenthesis i comma j right parenthesis-th minor of the matrix (or sometimes the minor of element upper A Subscript i j). We denote this as upper M Subscript i j. For instance, the minors associated with the first row of a 3 times 3 matrix are upper M 11 equals Start 2 By 2 Determinant 1st Row 1st Column upper A 22 2nd Column upper A 23 2nd Row 1st Column upper A 32 2nd Column upper A 33 EndDeterminant comma upper M 12 equals Start 2 By 2 Determinant 1st Row 1st Column upper A 21 2nd Column upper A 23 2nd Row 1st Column upper A 31 2nd Column upper A 33 EndDeterminant comma upper M 13 equals Start 2 By 2 Determinant 1st Row 1st Column upper A 21 2nd Column upper A 22 2nd Row 1st Column upper A 31 2nd Column upper A 32 EndDeterminant period

Recalling how we specified determinants of order 2 and 3, we see that det bold italic upper A equals upper A 11 dot upper M 11 minus upper A 12 dot upper M 12 plus upper A 13 dot upper M 13 period Note the alternating positive and negative signs.

Supplement 2

Cofactor matrix

For any element upper A Subscript i j of a square matrix bold italic upper A, the cofactor element is given by upper C Subscript i j Baseline equals left parenthesis negative 1 right parenthesis Superscript i plus j Baseline StartAbsoluteValue upper M Subscript i j Baseline EndAbsoluteValue where upper M Subscript i j is the left parenthesis i comma j right parenthesis-th minor of the matrix (and StartAbsoluteValue upper M Subscript i j Baseline EndAbsoluteValue refers to the determinant of that matrix). Thus, if we want to calculate upper C 12 we have that StartLayout 1st Row 1st Column upper C 12 2nd Column equals left parenthesis negative 1 right parenthesis Superscript 1 plus 2 Baseline StartAbsoluteValue upper M 12 EndAbsoluteValue 2nd Row 1st Column Blank 2nd Column equals left parenthesis negative 1 right parenthesis cubed StartAbsoluteValue upper M 12 EndAbsoluteValue 3rd Row 1st Column Blank 2nd Column equals minus StartAbsoluteValue upper M 12 EndAbsoluteValue EndLayout

The cofactor matrix bold italic upper C is obtained by replacing each element of the matrix bold italic upper A by its corresponding cofactor element upper C Subscript i j.

Let's assume that bold italic upper A equals Start 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column 3 2nd Column 2 2nd Row 1st Column 4 2nd Column negative 1 EndLayout EndMatrix period The cofactors are StartLayout 1st Row 1st Column upper C 11 2nd Column equals left parenthesis negative 1 right parenthesis Superscript 1 plus 1 Baseline StartAbsoluteValue upper M 11 EndAbsoluteValue equals negative 1 2nd Row 1st Column upper C 12 2nd Column equals left parenthesis negative 1 right parenthesis Superscript 1 plus 2 Baseline StartAbsoluteValue upper M 12 EndAbsoluteValue equals negative 4 3rd Row 1st Column upper C 21 2nd Column equals left parenthesis negative 1 right parenthesis Superscript 2 plus 1 Baseline StartAbsoluteValue upper M 21 EndAbsoluteValue equals negative 2 4th Row 1st Column upper C 22 2nd Column equals left parenthesis negative 1 right parenthesis Superscript 2 plus 2 Baseline StartAbsoluteValue upper M 22 EndAbsoluteValue equals 3 EndLayout since in this case upper M 11 equals negative 1 comma upper M 12 equals 4 comma upper M 21 equals 2 comma upper M 22 equals 3. Thus, we have that bold italic upper C equals Start 2 By 2 Matrix 1st Row 1st Column upper C 11 2nd Column upper C 12 2nd Row 1st Column upper C 21 2nd Column upper C 22 EndMatrix equals Start 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column negative 1 2nd Column negative 4 2nd Row 1st Column negative 2 2nd Column 3 EndLayout EndMatrix period

Properties of determinants
  • One can show that the determinant of a product of square matrices is the product of the determinants det left parenthesis bold italic upper A bold italic upper B right parenthesis equals det left parenthesis bold italic upper A right parenthesis det left parenthesis bold italic upper B right parenthesis period This implies that we can exchange the order of multiplication inside the determinant, as long as we end up with conformant matrix multiplications, so for example det left parenthesis bold italic upper A bold italic upper B bold italic upper C right parenthesis equals det left parenthesis bold italic upper A right parenthesis det left parenthesis bold italic upper B right parenthesis det left parenthesis bold italic upper C right parenthesis equals det left parenthesis bold italic upper B right parenthesis det left parenthesis bold italic upper A right parenthesis det left parenthesis bold italic upper C right parenthesis equals det left parenthesis bold italic upper B bold italic upper A bold italic upper C right parenthesis period

  • The determinant of bold italic upper A Superscript intercalate is the same as the determinant of bold italic upper A, i.e. det left parenthesis bold italic upper A right parenthesis equals det left parenthesis bold italic upper A Superscript intercalate Baseline right parenthesis.

  • The determinant of a matrix is non-zero if and only if the matrix is of full rank.

Trace of a matrix

The trace of a square matrix is the sum of its diagonal elements, i.e.\ the trace of the n times n matrix bold italic upper A is trace left parenthesis bold italic upper A right parenthesis equals sigma summation Underscript i equals 1 Overscript n Endscripts upper A Subscript i i Baseline period

Example 6

The trace of the matrix Start 2 By 2 Matrix 1st Row 1st Column 4 2nd Column 3 2nd Row 1st Column 3 2nd Column 1 EndMatrix is 4 plus 1 equals 5.

One can show that for conformable matrices bold italic upper A, bold italic upper B and bold italic upper C, trace left parenthesis bold italic upper A bold italic upper B bold italic upper C right parenthesis equals trace left parenthesis bold italic upper C bold italic upper A bold italic upper B right parenthesis equals trace left parenthesis bold italic upper B bold italic upper C bold italic upper A right parenthesis, as long as we end up with conformant matrix multiplications. Note however that in general, trace left parenthesis bold italic upper A bold italic upper B bold italic upper C right parenthesis not equals trace left parenthesis bold italic upper A bold italic upper C bold italic upper B right parenthesis and trace left parenthesis bold italic upper A bold italic upper B bold italic upper C right parenthesis not equals trace left parenthesis bold italic upper B bold italic upper A bold italic upper C right parenthesis. In other words, when computing the trace of a product of matrices we can move the first matrix to the end and vice versa, but cannot swap the order of terms as freely as we can for the determinant.

The inverse of a matrix

Definition

For a square matrix bold italic upper A, there may exist a matrix bold italic upper B such that bold italic upper A bold italic upper B equals bold italic upper B bold italic upper A equals upper I period

An inverse, if it exists is denoted as bold italic upper A Superscript negative 1, so the above definition can be written as bold italic upper A bold italic upper A Superscript negative 1 Baseline equals bold italic upper A Superscript negative 1 Baseline bold italic upper A equals upper I period

If an inverse does not exist for a matrix, the matrix is said to be singular. If an inverse exists, the matrix is said to be non-singular. One can show that square matrices are non-singular if and only if they are of full rank.

Properties of inverse matrices
  • The inverse of an inverse yields the original matrix: left parenthesis bold italic upper A Superscript negative 1 Baseline right parenthesis Superscript negative 1 Baseline equals bold italic upper A period
  • The inverse of a product is the product of inverses with order switched: left parenthesis bold italic upper A bold italic upper B right parenthesis Superscript negative 1 Baseline equals bold italic upper B Superscript negative 1 Baseline bold italic upper A Superscript negative 1 Baseline period
  • The inverse of a transpose is the transpose of the inverse: left parenthesis bold italic upper A Superscript intercalate Baseline right parenthesis Superscript negative 1 Baseline equals left parenthesis bold italic upper A Superscript negative 1 Baseline right parenthesis Superscript intercalate Baseline period
Calculating inverses of 2x2 matrices

Calculating inverses of matrices can be time-consuming, but a simple formula exists for 2 times 2 matrices. If bold italic upper A equals Start 2 By 2 Matrix 1st Row 1st Column a 2nd Column b 2nd Row 1st Column c 2nd Column d EndMatrix, then

bold italic upper A Superscript negative 1 Baseline equals Start 2 By 2 Matrix 1st Row 1st Column a 2nd Column b 2nd Row 1st Column c 2nd Column d EndMatrix Superscript negative 1 Baseline equals StartFraction 1 Over a d minus b c EndFraction Start 2 By 2 Matrix 1st Row 1st Column d 2nd Column negative b 2nd Row 1st Column negative c 2nd Column a EndMatrix comma

Note that the denominator in the multiplicative constant is just the determinant of bold upper A.

Example 7

Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column negative 5 2nd Row 1st Column negative 4 2nd Column 7 EndMatrix Superscript negative 1 Baseline equals ModifyingBelow StartFraction 1 Over 3 times 7 minus left parenthesis negative 5 right parenthesis times left parenthesis negative 4 right parenthesis EndFraction With bottom brace Underscript equals 1 Endscripts Start 2 By 2 Matrix 1st Row 1st Column 7 2nd Column 5 2nd Row 1st Column 4 2nd Column 3 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 7 2nd Column 5 2nd Row 1st Column 4 2nd Column 3 EndMatrix

Calculating inverses of diagonal matrices

If bold italic upper A is a diagonal matrix, then bold italic upper A Superscript negative 1 is also diagonal, with diagonal elements StartFraction 1 Over upper A Subscript i j Baseline EndFraction period

Supplement 3

Inverses of matrices of matrices of arbitrary dimension

For any square matrix bold italic upper A, the adjoint of bold italic upper A is given by the transpose of the cofactor matrix. Denoting the associated cofactor matrix as bold italic upper C, we have adj left parenthesis bold italic upper A right parenthesis equals bold italic upper C Superscript intercalate Baseline period

For any square matrix bold italic upper A, the inverse bold italic upper A Superscript negative 1 is given by bold italic upper A Superscript negative 1 Baseline equals StartFraction 1 Over det left parenthesis bold italic upper A right parenthesis EndFraction adj left parenthesis bold italic upper A right parenthesis comma which is defined as long as det left parenthesis bold italic upper A right parenthesis not equals 0.

An alternative approach would be to use Gaussian elimination.

Orthogonal matrices

A matrix bold italic upper A which satisfies the condition that bold italic upper P Superscript negative 1 Baseline equals bold italic upper P Superscript intercalate is said to be orthogonal.

In an orthogonal matrix the columns (or rows) are orthogonal (i.e. their inner product is 0) and the columns (or rows) have unit length (i.e. the squares of their entries sum to 1).

Quadratic forms

Quadratic forms play an important role in determining key properties of matrices.

Consider a quadratic function on double struck upper R squared: f left parenthesis x 1 comma x 2 right parenthesis equals a 11 x 1 squared plus left parenthesis a 12 plus a 21 right parenthesis x 1 x 2 plus a 22 x 2 squared.

(a 12 and a 21 are not uniquely defined as we only use their sum, so we can choose a 12 equals a 21, making the resulting matrix symmetric.)

Then we can define bold x equals Start 1 By 2 Matrix 1st Row 1st Column x 1 2nd Column x 2 EndMatrix and bold italic upper A equals Start 2 By 2 Matrix 1st Row 1st Column a 11 2nd Column a 12 2nd Row 1st Column a 21 2nd Column a 22 EndMatrix period

and rewrite f left parenthesis x 1 comma x 2 right parenthesis in terms of matrix-vector products.

This can be expressed in a matrix representation as StartLayout 1st Row 1st Column f left parenthesis x 1 comma x 2 right parenthesis 2nd Column equals bold x Superscript intercalate Baseline bold italic upper A bold x 2nd Row 1st Column Blank 2nd Column equals Start 1 By 2 Matrix 1st Row 1st Column x 1 2nd Column x 2 EndMatrix Start 2 By 2 Matrix 1st Row 1st Column a 11 2nd Column a 12 2nd Row 1st Column a 21 2nd Column a 22 EndMatrix StartBinomialOrMatrix x 1 Choose x 2 EndBinomialOrMatrix 3rd Row 1st Column Blank 2nd Column equals Start 1 By 2 Matrix 1st Row 1st Column x 1 2nd Column x 2 EndMatrix StartBinomialOrMatrix a 11 x 1 plus a 12 x 2 Choose a Baseline 21 x 1 plus a 22 x 2 EndBinomialOrMatrix 4th Row 1st Column Blank 2nd Column equals x 1 times left parenthesis a 11 x 1 plus a 12 x 2 right parenthesis plus x 2 times left parenthesis a Baseline 21 x 1 plus a 22 x 2 right parenthesis 5th Row 1st Column Blank 2nd Column equals a 11 x 1 squared plus left parenthesis a 12 plus a 21 right parenthesis x 1 x 2 plus a 22 x 2 squared EndLayout

Sign definiteness of quadratic forms

Given an n times n square matrix bold italic upper A and a quadratic form bold x Superscript intercalate Baseline bold italic upper A bold x; the matrix is said to be:

  • positive definite if bold x Superscript intercalate Baseline bold italic upper A bold x greater than 0 for all bold x not equals bold 0 in double struck upper R Superscript n.

  • positive semi-definite if bold x Superscript intercalate Baseline bold italic upper A bold x greater than or equals 0 for all bold x not equals bold 0 in double struck upper R Superscript n.

  • negative definite if bold x Superscript intercalate Baseline bold italic upper A bold x less than 0 for all bold x not equals bold 0 in double struck upper R Superscript n.

  • negative semi-definite if bold x Superscript intercalate Baseline bold italic upper A bold x less than or equals 0 for all bold x not equals bold 0 in double struck upper R Superscript n.

  • indefinite if bold x Superscript intercalate Baseline bold italic upper A bold x greater than 0 for some bold x in bold upper R Superscript n and bold x Superscript intercalate Baseline bold italic upper A bold x less than 0 for some others bold x in double struck upper R Superscript n.

Eigenvectors and eigenvalues

Consider a square matrix bold italic upper A. The non-zero vector bold v is called an eigenvector of bold italic upper A corresponding to the (scalar) eigenvalue lamda if bold italic upper A bold v equals lamda bold v

Note that if bold v satisfies the above definition then any scalar multiple of bold v will satisfy the above as well. Thus we will introduce the convention that we choose bold v such that is has unit length, StartMetric bold v EndMetric squared equals sigma summation Underscript i equals 1 Overscript n Endscripts v Subscript i Superscript 2 Baseline equals 1.

To find eigenvalues and eigenvectors we rewrite the previous definition as left parenthesis bold italic upper A minus lamda bold italic upper I right parenthesis bold v equals bold 0 where bold italic upper I is the identity matrix. A homogeneous system of linear equations only has non-zero solutions if the matrix defining the system of linear equations is not of full rank, i.e. \ det left parenthesis bold italic upper A minus lamda bold italic upper I right parenthesis equals 0 This determinant is a polynomial ("characteristic polynomial"), which can be solved for lamda, yielding the eigenvalues. These can the plugged into the first definition in order to obtain the eigenvectors.

Note that in general, eigenvalue and eigenvectors can contain complex numbers. However, if the matrix bold italic upper A is symmetric, this won't be the case.

Example 8

Let's find the eigenvalues and eigenvectors of the matrix Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column 4 2nd Row 1st Column 1 2nd Column 0 EndMatrix.

We first have to find det left parenthesis Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column 4 2nd Row 1st Column 1 2nd Column 0 EndMatrix minus lamda bold italic upper I right parenthesis equals det Start 2 By 2 Matrix 1st Row 1st Column negative lamda 2nd Column 4 2nd Row 1st Column 1 2nd Column negative lamda EndMatrix equals lamda squared minus 4 equals 0 period

This yields lamda 1 equals 2 and lamda 2 equals negative 2.

To find the eigenvector corresponding to lamda 1 equals 2 we need to solve the linear system

left parenthesis Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column 4 2nd Row 1st Column 1 2nd Column 0 EndMatrix minus 2 dot bold italic upper I right parenthesis bold v equals Start 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column negative 2 2nd Column 4 2nd Row 1st Column 1 2nd Column negative 2 EndLayout EndMatrix bold v equals StartBinomialOrMatrix 0 Choose 0 EndBinomialOrMatrix comma

thus the corresponding eigenvector is proportional to bold v 1 equals StartBinomialOrMatrix 2 Choose 1 EndBinomialOrMatrix. Why?

(Hint: Try replacing bold v with bold v equals StartBinomialOrMatrix v 1 Choose v 2 EndBinomialOrMatrix and solve the previous equation)

To find the eigenvector corresponding to lamda 2 equals negative 2 we need to solve the linear system

left parenthesis Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column 4 2nd Row 1st Column 1 2nd Column 0 EndMatrix minus left parenthesis negative 2 right parenthesis dot bold italic upper I right parenthesis bold v equals Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 4 2nd Row 1st Column 1 2nd Column 2 EndMatrix bold v equals StartBinomialOrMatrix 0 Choose 0 EndBinomialOrMatrix comma

thus the corresponding eigenvector is proportional to bold v 2 equals StartBinomialOrMatrix negative 2 Choose 1 EndBinomialOrMatrix. (Hint: Look at the previous hint)

In practice it is much easier (and numerically more efficient and stable) to use software like R or Matlab to find eigenvectors and eigenvalues. Note that in general, eigenvectors and eigenvalues are not necessarily real-valued: they might contain complex numbers.

Interpretation of eigenvectors and eigenvalues

We can interpret eigenvectors and eigenvalues as the direction and reciprocal length of the principal axis of the ellipsoid defined by bold x Superscript intercalate Baseline bold italic upper A Superscript negative 1 Baseline bold x equals 1. The principal axes of the ellispoid defined by the equation bold italic x Superscript intercalate Baseline bold italic upper A Superscript negative 1 Baseline bold italic x equals 1 are given by StartRoot lamda 1 EndRoot bold v 1 and StartRoot lamda 2 EndRoot bold v 2. The figure below shows this for bold italic upper A equals Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 1 2nd Row 1st Column 1 2nd Column 1 EndMatrix.

Figure 2

This has an important interpretation in Statistics. If we consider normally-distributed data with mean bold italic mu, (co-)variance matrix bold upper Sigma, then its isocontours (lines of constant density) are given by the equation left parenthesis bold x minus bold italic mu right parenthesis Superscript intercalate Baseline bold upper Sigma Superscript negative 1 Baseline left parenthesis bold x minus bold italic mu right parenthesis. Thus the eigenvectors of the (co-)variance matrix bold upper Sigma give the direction of largest and smallest spread of the distribution. The variances in these directions are given by the eigenvalues, or, equivalently, their standard deviations by the square root of the eigenvalues.

Relationship to other matrix properties

If the matrix bold italic upper A is symmetric (as it often is in Statistics and Machine Learning), then eigenvalues relate to many key properties of matrices

  • bold italic upper A is of full rank if and only if all eigenvalues are non-zero.
  • bold italic upper A is orthogonal if its eigenvalues are negative 1, 0, or 1.
  • bold italic upper A is positive (semi-)definite if all its eigenvalues are positive (non-negative).
  • bold italic upper A is negative (semi-)definite if all its eigenvalues are negative (non-positive).
  • The trace of a bold italic upper A is the sum of its eigenvalues and the determinant is the product of its eigenvalues.
  • bold italic upper A and its inverse bold italic upper A Superscript negative 1 have the same eigenvectors, but the eigenvalues of the inverse are the reciprocals of the eigenvalues of the matrix bold upper A.
Supplement 4

Finding square roots of matrices

Let upper A be a square matrix. A matrix upper B, where upper B squared equals upper A, is called a square root of upper A.

Let us consider the matrix upper A equals Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 2 2nd Row 1st Column 2 2nd Column 2 EndMatrix and matrix upper B equals Start 2 By 2 Matrix 1st Row 1st Column a 2nd Column b 2nd Row 1st Column c 2nd Column d EndMatrix Since upper B squared equals upper A, we have: Start 2 By 2 Matrix 1st Row 1st Column a 2nd Column b 2nd Row 1st Column c 2nd Column d EndMatrix Start 2 By 2 Matrix 1st Row 1st Column a 2nd Column b 2nd Row 1st Column c 2nd Column d EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 2 2nd Row 1st Column 2 2nd Column 2 EndMatrix This gives us: Start 2 By 2 Matrix 1st Row 1st Column a squared plus b c 2nd Column b left parenthesis a plus d right parenthesis 2nd Row 1st Column c left parenthesis a plus d right parenthesis 2nd Column c b plus d squared EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 2 2nd Row 1st Column 2 2nd Column 2 EndMatrix We now end up with four equations and four unknowns to find, and this is, if not difficult, certainly a rather tedious process. We note that the square root of a diagonal matrix can be found more easily. Recall that a diagonal matrix is a square matrix in which the non-diagonal entries are all zero.

The matrix Start 2 By 2 Matrix 1st Row 1st Column a 2nd Column 0 2nd Row 1st Column 0 2nd Column b EndMatrix has the following square roots: Start 2 By 2 Matrix 1st Row 1st Column StartRoot a EndRoot 2nd Column 0 2nd Row 1st Column 0 2nd Column StartRoot b EndRoot EndMatrix comma Start 2 By 2 Matrix 1st Row 1st Column minus StartRoot a EndRoot 2nd Column 0 2nd Row 1st Column 0 2nd Column StartRoot b EndRoot EndMatrix comma Start 2 By 2 Matrix 1st Row 1st Column StartRoot a EndRoot 2nd Column 0 2nd Row 1st Column 0 2nd Column minus StartRoot b EndRoot EndMatrix comma Start 2 By 2 Matrix 1st Row 1st Column minus StartRoot a EndRoot 2nd Column 0 2nd Row 1st Column 0 2nd Column minus StartRoot b EndRoot EndMatrix As the matrix upper A is not diagonal to start with, we can utilise a technique called diagonalisation to help us.

The first step towards this is to find the eigenvalues and eigenvectors of upper A.

We note that: det left parenthesis upper A minus lamda upper I right parenthesis equals Start 2 By 2 Determinant 1st Row 1st Column 2 minus lamda 2nd Column 2 2nd Row 1st Column 2 2nd Column 2 minus lamda EndDeterminant equals 0

This simplifies to: left parenthesis 2 minus lamda right parenthesis left parenthesis 2 minus lamda right parenthesis minus 4 equals lamda left parenthesis lamda minus 4 right parenthesis equals 0

Thus, the eigenvalues of upper A are 0 and 4.

Since upper A has two distinct eigenvalues, it is diagonalisable.

The next step is to find eigenvectors by solving upper Axequals 0.

Start 2 By 2 Matrix 1st Row 1st Column 2 minus lamda 2nd Column 2 2nd Row 1st Column 2 2nd Column 2 minus lamda EndMatrix StartBinomialOrMatrix x 1 Choose x 2 EndBinomialOrMatrix equals 0

By substituting in the eigenvalue lamda equals 0, we find the corresponding eigenvector is uequals StartBinomialOrMatrix 1 Choose negative 1 EndBinomialOrMatrix.

Similarly substituting in the eigenvalue lamda equals 4, we find the corresponding eigenvector vequals StartBinomialOrMatrix 1 Choose 1 EndBinomialOrMatrix.

If upper A is diagonalisable, then by definition, there must be an invertible matrix upper S, such that upper D equals upper S Superscript negative 1 Baseline upper A upper S is diagonal. We also know (from a theorem) that the column vectors of upper S must coincide with the eigenvectors of upper A.

With this in mind, we now define a non-singular matrix upper S equals[uv].

So, upper S equals Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 1 2nd Row 1st Column negative 1 2nd Column 1 EndMatrix

Evaluating upper S Superscript negative 1 Baseline upper A upper S gives us the diagonalised matrix upper D.

upper D equals upper S Superscript negative 1 Baseline upper A upper S equals Start 2 By 2 Matrix 1st Row 1st Column one half 2nd Column negative one half 2nd Row 1st Column one half 2nd Column one half EndMatrix Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 2 2nd Row 1st Column 2 2nd Column 2 EndMatrix Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 1 2nd Row 1st Column negative 1 2nd Column 1 EndMatrix upper D equals Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column 0 2nd Row 1st Column 0 2nd Column 4 EndMatrix

We now have a matrix upper D which is diagonal and note that the entries in the main diagonal are the same as the eigenvalues.

The square roots of upper D are: upper D Superscript one half Baseline equals Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column 0 2nd Row 1st Column 0 2nd Column 2 EndMatrix and Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column 0 2nd Row 1st Column 0 2nd Column negative 2 EndMatrix.

But what about the square roots of upper A?

Since upper D equals upper S Superscript negative 1 Baseline upper A upper S comma we have upper A equals upper S upper D upper S Superscript negative 1 Now consider: left parenthesis upper S upper D Superscript one half Baseline upper S Superscript negative 1 Baseline right parenthesis left parenthesis upper S upper D Superscript one half Baseline upper S Superscript negative 1 Baseline right parenthesis equals upper S upper D Superscript one half Baseline left parenthesis upper S Superscript negative 1 Baseline upper S right parenthesis upper D Superscript one half Baseline upper S Superscript negative 1 Baseline equals upper S upper D Superscript one half Baseline upper D Superscript one half Baseline upper S Superscript negative 1 Baseline equals upper S upper D upper S Superscript negative 1 Baseline equals upper A We can see that upper A equals left parenthesis upper S upper D Superscript one half Baseline upper S Superscript negative 1 Baseline right parenthesis squared Therefore, upper A Superscript one half Baseline equals upper S upper D Superscript one half Baseline upper S Superscript negative 1 We can now work out the square roots of A. We have: Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 1 2nd Row 1st Column negative 1 2nd Column 1 EndMatrix Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column 0 2nd Row 1st Column 0 2nd Column 2 EndMatrix Start 2 By 2 Matrix 1st Row 1st Column one half 2nd Column negative one half 2nd Row 1st Column one half 2nd Column one half EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 1 2nd Row 1st Column 1 2nd Column 1 EndMatrix and: Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 1 2nd Row 1st Column negative 1 2nd Column 1 EndMatrix Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column 0 2nd Row 1st Column 0 2nd Column negative 2 EndMatrix Start 2 By 2 Matrix 1st Row 1st Column one half 2nd Column negative one half 2nd Row 1st Column one half 2nd Column one half EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column negative 1 2nd Column negative 1 2nd Row 1st Column negative 1 2nd Column negative 1 EndMatrix

To summarise, the square roots of matrix upper A are Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 1 2nd Row 1st Column 1 2nd Column 1 EndMatrix and Start 2 By 2 Matrix 1st Row 1st Column negative 1 2nd Column negative 1 2nd Row 1st Column negative 1 2nd Column negative 1 EndMatrix.

Note that in this example, we had 2 distinct eigenvalues (i.e., the quadratic equation had two real roots). It is possible to have repeated or complex roots, but that is outside of the scope of this course.


Tasks
Task 4

Which of the following is not conformable under multiplication?

(a) Start 1 By 2 Matrix 1st Row 1st Column 2 2nd Column 3 EndMatrixStartBinomialOrMatrix 0 Choose 2 EndBinomialOrMatrix

(b) Start 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column negative 3 2nd Column 0 2nd Row 1st Column 0 2nd Column 2 EndLayout EndMatrixStartBinomialOrMatrix 0 Choose 2 EndBinomialOrMatrix

(c) Start 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column negative 3 2nd Column 0 3rd Column 4 2nd Row 1st Column 0 2nd Column 2 3rd Column 5 EndLayout EndMatrixStart 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column negative 3 2nd Column 0 2nd Row 1st Column 0 2nd Column 2 EndLayout EndMatrix

(d) Start 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column negative 3 2nd Column 0 2nd Row 1st Column 0 2nd Column 2 EndLayout EndMatrixStart 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column 4 2nd Column negative 3 3rd Column 0 2nd Row 1st Column 5 2nd Column 0 3rd Column 2 EndLayout EndMatrix

Show answer

VideoVideo model answersDuration1:52

Only in part (c) is the number of columns of the first matrix (3 columns) different from the number of rows of the second matrix (2 rows).

Task 5

Evaluate Start 2 By 2 Determinant 1st Row 1st Column a plus b 2nd Column c plus d 2nd Row 1st Column negative b 2nd Column negative d EndDeterminant

Show answer

VideoVideo model answersDuration0:52

Start 2 By 2 Determinant 1st Row 1st Column a plus b 2nd Column c plus d 2nd Row 1st Column negative b 2nd Column negative d EndDeterminant equals left parenthesis a plus b right parenthesis left parenthesis negative d right parenthesis minus left parenthesis negative b right parenthesis left parenthesis c plus d right parenthesis equals minus a d minus b d plus b c plus b d equals minus a d plus b c

Task 6

The multiplication of matrices Start 3 By 3 Matrix 1st Row 1st Column 2 2nd Column 0 3rd Column 4 2nd Row 1st Column 0 2nd Column 2 3rd Column 5 3rd Row 1st Column 2 2nd Column 1 3rd Column 3 EndMatrix and Start 3 By 1 Matrix 1st Row 3 2nd Row 0 3rd Row 1 EndMatrix gives a matrix of what dimension?

Show answer

The first matrix has 3 rows and 3 columns ("3 times 3") and the second matrix 3 rows and 1 column ("3 times 1").

The matrices are conformable as the number of columns of the first matrix (3) matches the number of rows of the second matrix (also 0). The resulting matrix has the same number of rows of the first matrix and the same number of columns as the second matrix, hence it is a 3 times 1 matrix.

Task 7

The addition of the matrices Start 3 By 3 Matrix 1st Row 1st Column negative 3 2nd Column 0 3rd Column 4 2nd Row 1st Column 0 2nd Column 2 3rd Column 5 3rd Row 1st Column 2 2nd Column 1 3rd Column 3 EndMatrix and Start 2 By 2 Matrix 1st Row 1st Column negative 3 2nd Column 0 2nd Row 1st Column 1 2nd Column 2 EndMatrix gives a matrix of what dimension?

Show answer

Only matrices of the same dimension can be added, hence we cannot add these matrices together.

Task 8

Can you find the trace and the determinant of the following matrices?

(a) Start 2 By 2 Matrix 1st Row 1st Column negative 3 2nd Column 3 2nd Row 1st Column 1 2nd Column 2 EndMatrix (b) Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column negative 1 2nd Row 1st Column 1 2nd Column 2 EndMatrix (c) Start 2 By 2 Matrix 1st Row 1st Column negative 3 2nd Column 3 2nd Row 1st Column 1 2nd Column 2 EndMatrix dot Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column negative 1 2nd Row 1st Column 1 2nd Column 2 EndMatrix

Show answer

VideoVideo model answersDuration3:06

For part (c) we first need to multiply the two matrices together

Start 2 By 2 Matrix 1st Row 1st Column negative 3 2nd Column 3 2nd Row 1st Column 1 2nd Column 2 EndMatrix dot Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column negative 1 2nd Row 1st Column 1 2nd Column 2 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column negative 3 dot 0 plus 3 dot 1 2nd Column negative 3 dot left parenthesis negative 1 right parenthesis plus 3 dot 2 2nd Row 1st Column 1 dot 0 plus 2 dot 1 2nd Column 1 dot left parenthesis negative 1 right parenthesis plus 2 dot 2 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 9 2nd Row 1st Column 2 2nd Column 3 EndMatrix

StartLayout 1st Row 1st Column trace left parenthesis Start 2 By 2 Matrix 1st Row 1st Column negative 3 2nd Column 3 2nd Row 1st Column 1 2nd Column 2 EndMatrix right parenthesis 2nd Column equals negative 3 plus 2 equals negative 1 3rd Column Start 2 By 2 Determinant 1st Row 1st Column negative 3 2nd Column 3 2nd Row 1st Column 1 2nd Column 2 EndDeterminant 4th Column equals negative 3 times 2 minus 1 times 3 equals negative 9 2nd Row 1st Column trace left parenthesis Start 2 By 2 Matrix 1st Row 1st Column 0 2nd Column negative 1 2nd Row 1st Column 1 2nd Column 2 EndMatrix right parenthesis 2nd Column equals 0 plus 2 equals 2 3rd Column Start 2 By 2 Determinant 1st Row 1st Column 0 2nd Column negative 1 2nd Row 1st Column 1 2nd Column 2 EndDeterminant 4th Column equals 0 times 2 minus 1 times left parenthesis negative 1 right parenthesis equals 1 3rd Row 1st Column trace left parenthesis Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 9 2nd Row 1st Column 2 2nd Column 3 EndMatrix right parenthesis 2nd Column equals 3 plus 3 equals 6 3rd Column Start 2 By 2 Determinant 1st Row 3 9 2nd Row 2 3 EndDeterminant 4th Column equals 3 times 3 minus 2 times 9 equals negative 9 EndLayout

Task 9

Let upper A equals Start 3 By 2 Matrix 1st Row 1st Column 1 2nd Column 0 2nd Row 1st Column negative 2 2nd Column 1 3rd Row 1st Column 3 2nd Column 5 EndMatrix comma upper B equals Start 3 By 2 Matrix 1st Row 1st Column 2 2nd Column 1 2nd Row 1st Column 4 2nd Column 1 3rd Row 1st Column 0 2nd Column negative 3 EndMatrix and upper C equals Start 3 By 2 Matrix 1st Row 1st Column negative 1 2nd Column 3 2nd Row 1st Column 1 2nd Column 6 3rd Row 1st Column negative 2 2nd Column 2 EndMatrix. Find upper A plus upper B minus 2 upper C.

Show answer

VideoVideo model answersDuration1:35

Start 3 By 2 Matrix 1st Row 1st Column 1 2nd Column 0 2nd Row 1st Column negative 2 2nd Column 1 3rd Row 1st Column 3 2nd Column 5 EndMatrix plus Start 3 By 2 Matrix 1st Row 1st Column 2 2nd Column 1 2nd Row 1st Column 4 2nd Column 1 3rd Row 1st Column 0 2nd Column negative 3 EndMatrix minus 2 Start 3 By 2 Matrix 1st Row 1st Column negative 1 2nd Column 3 2nd Row 1st Column 1 2nd Column 6 3rd Row 1st Column negative 2 2nd Column 2 EndMatrix equals Start 3 By 2 Matrix 1st Row 1st Column 5 2nd Column negative 5 2nd Row 1st Column 0 2nd Column negative 10 3rd Row 1st Column 7 2nd Column negative 2 EndMatrix

Task 10

Let bold italic upper D equals Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column negative 2 2nd Row 1st Column 3 2nd Column negative 1 EndMatrix, bold italic upper E equals Start 2 By 3 Matrix 1st Row 1st Column 4 2nd Column negative 1 3rd Column 2 2nd Row 1st Column 3 2nd Column negative 2 3rd Column 2 EndMatrix, and bold italic upper F equals Start 3 By 2 Matrix 1st Row 1st Column 1 2nd Column 5 2nd Row 1st Column negative 2 2nd Column 3 3rd Row 1st Column 3 2nd Column negative 2 EndMatrix \newline State which of the products bold italic upper D squared, bold italic upper E bold italic upper D, bold italic upper D bold italic upper E, bold italic upper E squared, bold italic upper E bold italic upper F, bold italic upper F bold italic upper E and bold italic upper F squared exist, and work out those that do exist.

Show answer

The dimensions of the matrices are

MatrixDimension
bold italic upper D2 times 2
bold italic upper E2 times 3
bold italic upper F3 times 2

To calculate bold italic upper D squared, we multiply a 2 times 2 matrix by a 2 times 2 matrix. The number of columns of the first matrix (2) matches the number of rows of the second matrix (2). Hence, the matrices are conformable and the resulting matrix is of dimension 2 times 2.

bold italic upper D squared equals bold italic upper D dot bold italic upper D equals Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column negative 2 2nd Row 1st Column 3 2nd Column negative 1 EndMatrix dot Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column negative 2 2nd Row 1st Column 3 2nd Column negative 1 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 1 times 1 plus left parenthesis negative 2 right parenthesis times 3 2nd Column 1 times left parenthesis negative 2 right parenthesis plus left parenthesis negative 2 right parenthesis times left parenthesis negative 1 right parenthesis 2nd Row 1st Column 3 times 1 plus left parenthesis negative 1 right parenthesis times 3 2nd Column 3 times left parenthesis negative 2 right parenthesis plus left parenthesis negative 1 right parenthesis times left parenthesis negative 1 right parenthesis EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column negative 5 2nd Column 0 2nd Row 1st Column 0 2nd Column negative 5 EndMatrix

To calculate bold italic upper E bold italic upper D, we multiply a 2 times 3 matrix by a 2 times 2 matrix. The number of columns of the first matrix (3) does not match the number of rows of the second matrix (2). Hence, the matrices are not conformable and cannot be multiplied.

To calculate bold italic upper D bold italic upper E, we multiply a 2 times 2 matrix by a 2 times 3 matrix. The number of columns of the first matrix (2) matches the number of rows of the second matrix (2). Hence, the matrices are conformable and the resulting matrix is of dimension 2 times 3.

bold italic upper D dot bold italic upper E equals Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column negative 2 2nd Row 1st Column 3 2nd Column negative 1 EndMatrix dot Start 2 By 3 Matrix 1st Row 1st Column 4 2nd Column negative 1 3rd Column 2 2nd Row 1st Column 3 2nd Column negative 2 3rd Column 2 EndMatrix equals Start 2 By 3 Matrix 1st Row 1st Column 1 times 4 plus left parenthesis negative 2 right parenthesis times 3 2nd Column 1 times left parenthesis negative 1 right parenthesis plus left parenthesis negative 2 right parenthesis times left parenthesis negative 2 right parenthesis 3rd Column 1 times 2 plus left parenthesis negative 2 right parenthesis times 2 2nd Row 1st Column 3 times 4 plus left parenthesis negative 1 right parenthesis times 3 2nd Column 3 times left parenthesis negative 1 right parenthesis plus left parenthesis negative 1 right parenthesis times left parenthesis negative 2 right parenthesis 3rd Column 3 times 2 plus left parenthesis negative 1 right parenthesis times 2 EndMatrix equals Start 2 By 3 Matrix 1st Row 1st Column negative 2 2nd Column 3 3rd Column negative 2 2nd Row 1st Column 9 2nd Column negative 1 3rd Column 4 EndMatrix

To calculate bold italic upper E squared, we multiply a 2 times 3 matrix by a 2 times 3 matrix. The number of columns of the first matrix (3) does not match the number of rows of the second matrix (2). Hence, the matrices are not conformable and cannot be multiplied.

To calculate bold italic upper E bold italic upper F, we multiply a 2 times 3 matrix by a 3 times 2 matrix. The number of columns of the first matrix (3) matches the number of rows of the second matrix (3). Hence, the matrices are conformable and the resulting matrix is of dimension 2 times 2.

bold italic upper E dot bold italic upper F equals Start 2 By 3 Matrix 1st Row 1st Column 4 2nd Column negative 1 3rd Column 2 2nd Row 1st Column 3 2nd Column negative 2 3rd Column 2 EndMatrix dot Start 3 By 2 Matrix 1st Row 1st Column 1 2nd Column 5 2nd Row 1st Column negative 2 2nd Column 3 3rd Row 1st Column 3 2nd Column negative 2 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 4 times 1 plus left parenthesis negative 1 right parenthesis times left parenthesis negative 2 right parenthesis plus 2 times 3 2nd Column 4 times 5 plus left parenthesis negative 1 right parenthesis times 3 plus 2 times left parenthesis negative 2 right parenthesis 2nd Row 1st Column 3 times 1 plus left parenthesis negative 2 right parenthesis times left parenthesis negative 2 right parenthesis plus 2 times 3 2nd Column 3 times 5 plus left parenthesis negative 2 right parenthesis times 3 plus 2 times left parenthesis negative 2 right parenthesis EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 12 2nd Column 13 2nd Row 1st Column 13 2nd Column 5 EndMatrix

To calculate bold italic upper F bold italic upper E, we multiply a 3 times 2 matrix by a 2 times 3 matrix. The number of columns of the first matrix (2) matches the number of rows of the second matrix (2). Hence, the matrices are conformable and the resulting matrix is of dimension 3 times 3.

bold italic upper F dot bold italic upper E equals Start 3 By 2 Matrix 1st Row 1st Column 1 2nd Column 5 2nd Row 1st Column negative 2 2nd Column 3 3rd Row 1st Column 3 2nd Column negative 2 EndMatrix dot Start 2 By 3 Matrix 1st Row 1st Column 4 2nd Column negative 1 3rd Column 2 2nd Row 1st Column 3 2nd Column negative 2 3rd Column 2 EndMatrix equals Start 3 By 3 Matrix 1st Row 1st Column 1 times 4 plus 5 times 3 2nd Column 1 times left parenthesis negative 1 right parenthesis plus 5 times left parenthesis negative 2 right parenthesis 3rd Column 1 times 2 plus 5 times 2 2nd Row 1st Column left parenthesis negative 2 right parenthesis times 4 plus 3 times 3 2nd Column left parenthesis negative 2 right parenthesis times left parenthesis negative 1 right parenthesis plus 3 times left parenthesis negative 2 right parenthesis 3rd Column left parenthesis negative 2 right parenthesis times 2 plus 3 times 2 3rd Row 1st Column 3 times 4 plus left parenthesis negative 2 right parenthesis times 3 2nd Column 3 times left parenthesis negative 1 right parenthesis plus left parenthesis negative 2 right parenthesis times left parenthesis negative 2 right parenthesis 3rd Column 3 times 2 plus left parenthesis negative 2 right parenthesis times 2 EndMatrix equals Start 3 By 3 Matrix 1st Row 1st Column 19 2nd Column negative 11 3rd Column 12 2nd Row 1st Column 1 2nd Column negative 4 3rd Column 2 3rd Row 1st Column 6 2nd Column 1 3rd Column 2 EndMatrix

To calculate bold italic upper F squared, we multiply a 3 times 2 matrix by a 3 times 2 matrix. The number of columns of the first matrix (2) does not match the number of rows of the second matrix (3). Hence, the matrices are not conformable and cannot be multiplied.

Task 11

State whether or not the matrix product can be calculated for each pair of matrices. If so, calculate it and state the order of the resulting matrix. If not, state why the product cannot be calculated.

(a) Product bold italic upper A bold italic upper B when bold italic upper A equals Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column negative 1 2nd Row 1st Column 3 2nd Column 2 EndMatrix and bold italic upper B equals Start 1 By 2 Matrix 1st Row 1st Column 4 2nd Column negative 2 EndMatrix

(b) Product bold italic upper C bold italic upper D when bold italic upper C equals Start 1 By 2 Matrix 1st Row 1st Column 3 2nd Column 5 EndMatrix and bold italic upper D equals Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 2 2nd Row 1st Column 2 2nd Column 2 EndMatrix

(c) Product bold italic upper E bold italic upper F when bold italic upper E equals Start 2 By 2 Matrix 1st Row 1st Column 4 2nd Column 3 2nd Row 1st Column negative 1 2nd Column 2 EndMatrix and bold italic upper F equals Start 2 By 3 Matrix 1st Row 1st Column 2 2nd Column 4 3rd Column 5 2nd Row 1st Column 6 2nd Column 1 3rd Column negative 1 EndMatrix

(d) Product bold italic upper G bold italic upper H when bold italic upper G equals Start 2 By 3 Matrix 1st Row 1st Column 5 2nd Column 3 3rd Column 1 2nd Row 1st Column 1 2nd Column 2 3rd Column 1 EndMatrix and bold italic upper H equals Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 0 2nd Row 1st Column 1 2nd Column 4 EndMatrix

Show answer

VideoVideo model answers to parts (a) and (b)Duration2:31

(a) Not conformable.

(b) bold italic upper C dot bold italic upper D equals Start 1 By 2 Matrix 1st Row 1st Column 3 2nd Column 5 EndMatrix dot Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 2 2nd Row 1st Column 2 2nd Column 2 EndMatrix equals Start 1 By 2 Matrix 1st Row 1st Column 3 times 3 plus 5 times 2 2nd Column 3 times 2 plus 5 times 2 EndMatrix equals Start 1 By 2 Matrix 1st Row 1st Column 19 2nd Column 16 EndMatrix

(c) bold italic upper E dot bold italic upper E equals Start 2 By 2 Matrix 1st Row 1st Column 4 2nd Column 3 2nd Row 1st Column negative 1 2nd Column 2 EndMatrix dot Start 2 By 3 Matrix 1st Row 1st Column 2 2nd Column 4 3rd Column 5 2nd Row 1st Column 6 2nd Column 1 3rd Column negative 1 EndMatrix equals Start 2 By 3 Matrix 1st Row 1st Column 4 times 2 plus 3 times 6 2nd Column 4 times 4 plus 3 times 1 3rd Column 4 times 5 plus 3 times left parenthesis negative 1 right parenthesis 2nd Row 1st Column left parenthesis negative 1 right parenthesis times 2 plus 2 times 6 2nd Column left parenthesis negative 1 right parenthesis times 4 plus 2 times 1 3rd Column left parenthesis negative 1 right parenthesis times 5 plus 2 times left parenthesis negative 1 right parenthesis EndMatrix equals Start 2 By 3 Matrix 1st Row 1st Column 26 2nd Column 19 3rd Column 17 2nd Row 1st Column 10 2nd Column negative 2 3rd Column negative 7 EndMatrix

(d) Not conformable

Task 12

Determine the rank of the following matrix, bold italic upper D equals Start 1 By 1 Matrix 1st Row StartLayout 1st Row 1st Column 1 2nd Column negative 1 3rd Column 1 4th Column negative 1 2nd Row 1st Column negative 1 2nd Column 1 3rd Column negative 1 4th Column 1 3rd Row 1st Column 1 2nd Column negative 1 3rd Column 1 4th Column negative 1 4th Row 1st Column negative 1 2nd Column 1 3rd Column negative 1 4th Column 1 EndLayout EndMatrix

Show answer

VideoVideo model answersDuration0:44

The second row is the negative of the first row, the third row is identical to the first row and the fourth row is identical to the second row. Hence the rank is 1.

Task 13

Given the following matrix bold italic upper B, calculate trace left parenthesis bold italic upper B right parenthesis:

bold italic upper B equals Start 5 By 5 Matrix 1st Row 1st Column 1 2nd Column 2 3rd Column 3 4th Column 4 5th Column 2 2nd Row 1st Column negative 4 2nd Column 11 3rd Column 5 4th Column 2 5th Column 0 3rd Row 1st Column negative 1 2nd Column 0 3rd Column 3 4th Column pi 5th Column 3 4th Row 1st Column 22 2nd Column 5 3rd Column 3 4th Column 1 5th Column 1 5th Row 1st Column 3 2nd Column 5 3rd Column negative 22 4th Column 1 5th Column 14 EndMatrix

Show answer

trace left parenthesis bold italic upper B right parenthesis equals trace left parenthesis Start 5 By 5 Matrix 1st Row 1st Column 1 2nd Column 2 3rd Column 3 4th Column 4 5th Column 2 2nd Row 1st Column negative 4 2nd Column 11 3rd Column 5 4th Column 2 5th Column 0 3rd Row 1st Column negative 1 2nd Column 0 3rd Column 3 4th Column pi 5th Column 3 4th Row 1st Column 22 2nd Column 5 3rd Column 3 4th Column 1 5th Column 1 5th Row 1st Column 3 2nd Column 5 3rd Column negative 22 4th Column 1 5th Column 14 EndMatrix right parenthesis equals 1 plus 11 plus 3 plus 1 plus 14 equals 30

Task 14

Find all values of n such that trace left parenthesis bold italic upper C right parenthesis equals 23.

bold italic upper C equals Start 3 By 3 Matrix 1st Row 1st Column 3 2nd Column n 3rd Column 2 n 2nd Row 1st Column 0 2nd Column n squared 3rd Column 1 3rd Row 1st Column 2 2nd Column 3 n 3rd Column 4 EndMatrix

Show answer

VideoVideo model answersDuration0:56

trace left parenthesis bold italic upper C right parenthesis equals trace left parenthesis Start 3 By 3 Matrix 1st Row 1st Column 3 2nd Column n 3rd Column 2 n 2nd Row 1st Column 0 2nd Column n squared 3rd Column 1 3rd Row 1st Column 2 2nd Column 3 n 3rd Column 4 EndMatrix right parenthesis equals 3 plus n squared plus 4 equals 23

Hence, n squared equals 23 minus 3 minus 4 equals 16 and n equals plus or minus 4.

Task 15

Find the inverse of the matrix

bold italic upper A equals Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 0 2nd Row 1st Column 0 2nd Column negative 2 EndMatrix

Show answer

VideoVideo model answersDuration2:35

bold italic upper A Superscript negative 1 Baseline equals Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 0 2nd Row 1st Column 0 2nd Column negative 2 EndMatrix Superscript negative 1 Baseline equals StartFraction 1 Over 3 times left parenthesis negative 2 right parenthesis minus 0 times 0 EndFraction Start 2 By 2 Matrix 1st Row 1st Column negative 2 2nd Column 0 2nd Row 1st Column 0 2nd Column 3 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column one third 2nd Column 0 2nd Row 1st Column 0 2nd Column negative one half EndMatrix

We could have also used the fact that the matrix is diagonal and simply taken the reciprocals of the diagonal elements.

Task 16

Suppose that bold italic upper A and bold italic upper B are 2 times 2 matrices and let bold italic upper A bold italic upper B = bold italic upper B bold italic upper A = Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 0 2nd Row 1st Column 0 2nd Column 3 EndMatrix. Which of the following statements is true?

(a) bold italic upper A = bold italic upper B Superscript negative 1 (b) bold italic upper B = bold italic upper A Superscript negative 1 (c) bold italic upper A Superscript negative 1 = one third bold italic upper B (d) bold italic upper A Superscript negative 1 = 3 bold italic upper B

Show answer

VideoVideo model answersDuration1:12

We have that bold italic upper A bold italic upper B equals 3 bold italic upper I, which is the same as bold italic upper A one third bold italic upper B equals bold italic upper I, hence bold italic upper A Superscript negative 1 Baseline equals one third bold italic upper B.

Task 17

Which of these matrices are orthogonal?

bold italic upper P equals Start 3 By 3 Matrix 1st Row 1st Column three fifths 2nd Column negative four fifths 3rd Column 0 2nd Row 1st Column four fifths 2nd Column three fifths 3rd Column 0 3rd Row 1st Column 0 2nd Column 0 3rd Column 1 EndMatrix, bold italic upper Q equals Start 3 By 3 Matrix 1st Row 1st Column 2 2nd Column 0 3rd Column 1 2nd Row 1st Column 1 2nd Column 2 3rd Column 2 3rd Row 1st Column 2 2nd Column 1 3rd Column 0 EndMatrix, bold italic upper R equals Start 2 By 2 Matrix 1st Row 1st Column StartFraction 1 Over StartRoot 2 EndRoot EndFraction 2nd Column StartFraction 1 Over StartRoot 2 EndRoot EndFraction 2nd Row 1st Column StartFraction 1 Over StartRoot 2 EndRoot EndFraction 2nd Column minus StartFraction 1 Over StartRoot 2 EndRoot EndFraction EndMatrix

Show answer

VideoVideo model answersDuration2:59

We need to multiply the matrices by their transpose and check whether the result is the identity matrix.

This is the case for bold italic upper P and bold italic upper R, hence they are orthogonal. bold italic upper Q is not orthogonal.

Task 18

Calculate the determinant of the following matrices.

(a) bold italic upper X equals Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 1 2nd Row 1st Column 2 2nd Column one half EndMatrix

(b) bold italic upper Y equals Start 2 By 2 Matrix 1st Row 1st Column 4 2nd Column 0 2nd Row 1st Column 1 2nd Column 1 EndMatrix

(c) bold italic upper Z equals Start 2 By 2 Matrix 1st Row 1st Column one half 2nd Column one half 2nd Row 1st Column negative one third 2nd Column one fourth EndMatrix

(d) bold italic upper U equals Start 3 By 3 Matrix 1st Row 1st Column 1 2nd Column 0 3rd Column 4 2nd Row 1st Column 3 2nd Column 1 3rd Column 1 3rd Row 1st Column negative 1 2nd Column 2 3rd Column negative 2 EndMatrix

(e) bold italic upper V equals Start 3 By 3 Matrix 1st Row 1st Column 4 2nd Column 1 3rd Column 3 2nd Row 1st Column 0 2nd Column 2 3rd Column negative 1 3rd Row 1st Column 3 2nd Column 0 3rd Column 7 EndMatrix

Show answer

VideoVideo model answers for part (d)Duration1:59

(a) det left parenthesis bold italic upper X right parenthesis equals Start 2 By 2 Determinant 1st Row 1st Column 3 2nd Column 1 2nd Row 1st Column 2 2nd Column one half EndDeterminant equals 3 times one half minus 2 times 1 equals three halves minus four halves equals negative one half

(b) det left parenthesis bold italic upper Y right parenthesis equals Start 2 By 2 Determinant 1st Row 4 0 2nd Row 1 1 EndDeterminant equals 4 times 1 minus 1 times 0 equals 4

(c) det left parenthesis bold italic upper Z right parenthesis equals Start 2 By 2 Determinant 1st Row 1st Column one half 2nd Column one half 2nd Row 1st Column negative one third 2nd Column one fourth EndDeterminant equals one half times one fourth minus left parenthesis negative one third times one half right parenthesis equals one eighth plus one sixth equals seven twenty fourths

(d)

StartLayout 1st Row 1st Column Start 3 By 3 Determinant 1st Row 1st Column 1 2nd Column 0 3rd Column 4 2nd Row 1st Column 3 2nd Column 1 3rd Column 1 3rd Row 1st Column negative 1 2nd Column 2 3rd Column negative 2 EndDeterminant 2nd Column equals 1 times 1 times left parenthesis negative 2 right parenthesis plus 0 times 1 times left parenthesis negative 1 right parenthesis plus 4 times 3 times 2 2nd Row 1st Column Blank 2nd Column minus left parenthesis negative 1 right parenthesis times 1 times 4 minus 2 times 1 times 1 minus left parenthesis negative 2 right parenthesis times 3 times 0 3rd Row 1st Column Blank 2nd Column equals negative 2 plus 0 plus 24 minus left parenthesis negative 4 right parenthesis minus 2 minus 0 4th Row 1st Column Blank 2nd Column equals 24 EndLayout

(e)

StartLayout 1st Row 1st Column Start 3 By 3 Determinant 1st Row 1st Column 4 2nd Column 1 3rd Column 3 2nd Row 1st Column 0 2nd Column 2 3rd Column negative 1 3rd Row 1st Column 3 2nd Column 0 3rd Column 7 EndDeterminant 2nd Column equals 4 times 2 times 7 plus 1 times left parenthesis negative 1 right parenthesis times 3 plus 3 times 0 times 0 2nd Row 1st Column Blank 2nd Column negative 3 times 2 times 3 minus 0 times left parenthesis negative 1 right parenthesis times 4 minus 7 times 0 times 1 3rd Row 1st Column Blank 2nd Column equals 56 plus left parenthesis negative 3 right parenthesis plus 0 minus 18 minus 0 minus 0 4th Row 1st Column Blank 2nd Column equals 35 EndLayout

Do also watch the video model answers to part (d). They show how to calculate the determinant using minors, rather than the formula for 3 times 3 matrices given in the notes.

Task 19

Find the eigenvalues and eigenvectors of the following matrices.

(a) bold italic upper X equals Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 1 2nd Row 1st Column 2 2nd Column 4 EndMatrix

(b) bold italic upper Y equals Start 2 By 2 Matrix 1st Row 1st Column 2 2nd Column 1 2nd Row 1st Column negative 1 2nd Column 4 EndMatrix

(c) bold italic upper Z equals Start 3 By 3 Matrix 1st Row 1st Column 2 2nd Column 1 3rd Column 0 2nd Row 1st Column 0 2nd Column 2 3rd Column 1 3rd Row 1st Column 0 2nd Column 0 3rd Column 2 EndMatrix

Show answer

(a) To find the eigenvalues of upper X, we first solve: det left parenthesis bold italic upper X minus lamda bold italic upper I right parenthesis equals 0

Recall that lamda bold italic upper I equals lamda Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 0 2nd Row 1st Column 0 2nd Column 1 EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column lamda 2nd Column 0 2nd Row 1st Column 0 2nd Column lamda EndMatrix

We have: bold italic upper X minus lamda bold italic upper I equals Start 2 By 2 Matrix 1st Row 1st Column 3 2nd Column 1 2nd Row 1st Column 2 2nd Column 4 EndMatrix minus Start 2 By 2 Matrix 1st Row 1st Column lamda 2nd Column 0 2nd Row 1st Column 0 2nd Column lamda EndMatrix equals Start 2 By 2 Matrix 1st Row 1st Column 3 minus lamda 2nd Column 1 2nd Row 1st Column 2 2nd Column 4 minus lamda EndMatrix

So continuing, we get: det left parenthesis bold italic upper X minus lamda bold italic upper I right parenthesis equals left parenthesis 3 minus lamda right parenthesis left parenthesis 4 minus lamda right parenthesis minus left parenthesis 2 times 1 right parenthesis equals 0

This simplifies to: 12 minus 3 lamda minus 4 lamda plus lamda squared minus 2 equals 0 lamda squared minus 7 lamda plus 10 equals 0 left parenthesis lamda minus 2 right parenthesis left parenthesis lamda minus 5 right parenthesis equals 0 lamda equals 2 comma 5

Thus, the eigenvalues of bold italic upper X are asterisk asterisk 2 asterisk asterisk and asterisk asterisk 5 asterisk asterisk.

To find eigenvectors, we solve: left parenthesis bold italic upper X minus lamda bold italic upper I right parenthesis bold italic v equals 0 comma where asterisk asterisk v asterisk asterisk is the eigenvector and lamda is the corresponding eigenvalue. We have: Start 2 By 2 Matrix 1st Row 1st Column 3 minus lamda 2nd Column 1 2nd Row 1st Column 2 2nd Column 4 minus lamda EndMatrix StartBinomialOrMatrix v 1 Choose v 2 EndBinomialOrMatrix equals 0

We substitute the eigenvalue lamda equals 2 into the matrix above to get: Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 1 2nd Row 1st Column 2 2nd Column 2 EndMatrix StartBinomialOrMatrix v 1 Choose v 2 EndBinomialOrMatrix equals 0 What we are doing is that we are solving this for bold italic v, and note that this is in fact a set of equations in the components of bold italic v. So, multiplying the matrices gives us: v 1 plus v 2 equals 0 2 v 1 plus 2 v 2 equals 0 These equations are essentially the same and we find they both simplify out to: v 1 equals minus v 2

We do not expect to find a unique solution here as we only have one equation with two unknowns. Any scalar multiple of the solution will be a another solution.

So, suppose we let v 2 equals k, then v 1 equals negative k. Thus, for any value of k, we have: StartBinomialOrMatrix negative k Choose k EndBinomialOrMatrix equals k StartBinomialOrMatrix negative 1 Choose 1 EndBinomialOrMatrix We go for the \lq simplest form' of the eigenvector (the simplest non-zero multiple of this) to get: eigenvalue StartBinomialOrMatrix negative 1 Choose 1 EndBinomialOrMatrix corresponding to the eigenvector lamda equals 2 period

Similarly, we now substitute the second eigenvalue lamda equals 5 into Start 2 By 2 Matrix 1st Row 1st Column 3 minus lamda 2nd Column 1 2nd Row 1st Column 2 2nd Column 4 minus lamda EndMatrix StartBinomialOrMatrix v 1 Choose v 2 EndBinomialOrMatrix equals 0

to get: Start 2 By 2 Matrix 1st Row 1st Column negative 2 2nd Column 1 2nd Row 1st Column 2 2nd Column negative 1 EndMatrix StartBinomialOrMatrix v 1 Choose v 2 EndBinomialOrMatrix equals 0 Now multiplying the matrices gives us: minus 2 v 1 plus v 2 equals 0 2 v 1 minus v 2 equals 0 Both equations simplify out to: 2 v 1 equals v 2

Suppose we let v 1 equals k, then v 2 equals 2 k. Thus, for any value of k, we have: StartBinomialOrMatrix k Choose 2 k EndBinomialOrMatrix equals k StartBinomialOrMatrix 1 Choose 2 EndBinomialOrMatrix We go for the \lq simplest form' of the eigenvector (the simplest non-zero multiple of this) to get: eigenvector StartBinomialOrMatrix negative 1 Choose 1 EndBinomialOrMatrix corresponding to the eigenvalue lamda equals 5 period

(b) lamda equals 3 (multiplicity of 2), StartBinomialOrMatrix 1 Choose 1 EndBinomialOrMatrix

(c) To find the eigenvalues of bold italic upper Z, we first solve: det left parenthesis bold italic upper Z minus lamda bold italic upper I right parenthesis equals 0

Recall that lamda bold italic upper I equals lamda Start 3 By 3 Matrix 1st Row 1st Column 1 2nd Column 0 3rd Column 0 2nd Row 1st Column 0 2nd Column 1 3rd Column 0 3rd Row 1st Column 0 2nd Column 0 3rd Column 1 EndMatrix equals Start 3 By 3 Matrix 1st Row 1st Column lamda 2nd Column 0 3rd Column 0 2nd Row 1st Column 0 2nd Column lamda 3rd Column 0 3rd Row 1st Column 0 2nd Column 0 3rd Column lamda EndMatrix

We have: bold italic upper Z minus lamda bold italic upper I equals Start 3 By 3 Matrix 1st Row 1st Column 2 2nd Column 1 3rd Column 0 2nd Row 1st Column 0 2nd Column 2 3rd Column 1 3rd Row 1st Column 0 2nd Column 0 3rd Column 2 EndMatrix minus Start 3 By 3 Matrix 1st Row 1st Column lamda 2nd Column 0 3rd Column 0 2nd Row 1st Column 0 2nd Column lamda 3rd Column 0 3rd Row 1st Column 0 2nd Column 0 3rd Column lamda EndMatrix equals Start 3 By 3 Matrix 1st Row 1st Column 2 minus lamda 2nd Column 1 3rd Column 0 2nd Row 1st Column 0 2nd Column 2 minus lamda 3rd Column 1 3rd Row 1st Column 0 2nd Column 0 3rd Column 2 minus lamda EndMatrix

So continuing, we get: det left parenthesis bold italic upper Z minus lamda bold italic upper I right parenthesis equals left parenthesis 2 minus lamda right parenthesis left parenthesis 2 minus lamda right parenthesis left parenthesis 2 minus lamda right parenthesis minus left parenthesis 1 times 0 right parenthesis plus 0 equals 0

This simplifies to: left parenthesis lamda minus 2 right parenthesis cubed equals 0 lamda equals 2

Thus, the eigenvalue of bold italic upper Z is asterisk asterisk 2 asterisk asterisk.

(Note that we have repeated roots here and multiplicity of 3.)

To find the eigenvector, we solve left parenthesis bold italic upper Z minus lamda bold italic upper I right parenthesis bold italic v equals 0, where bold italic v is the eigenvector and lamda is the corresponding eigenvalue. We have: Start 3 By 3 Matrix 1st Row 1st Column 2 minus lamda 2nd Column 1 3rd Column 0 2nd Row 1st Column 0 2nd Column 2 minus lamda 3rd Column 1 3rd Row 1st Column 0 2nd Column 0 3rd Column 2 minus lamda EndMatrix Start 3 By 1 Matrix 1st Row v 1 2nd Row v 2 3rd Row v 3 EndMatrix equals 0

and substituting the eigenvalue lamda equals 2 into the matrix above to get: Start 3 By 3 Matrix 1st Row 1st Column 0 2nd Column 1 3rd Column 0 2nd Row 1st Column 0 2nd Column 0 3rd Column 1 3rd Row 1st Column 0 2nd Column 0 3rd Column 1 EndMatrix Start 3 By 1 Matrix 1st Row v 1 2nd Row v 2 3rd Row v 3 EndMatrix equals 0 We are solving this for v, and note that this is in fact a set of equations in the components of v. So, multiplying the matrices gives us: v 2 equals 0 v 3 equals 0

Suppose we let v 1 equals k, and we can see that v 2 equals 0 and v 3 equals 0 as well. Thus, for any value of k, we have the eigenvector: Start 3 By 1 Matrix 1st Row k 2nd Row 0 3rd Row 0 EndMatrix equals k Start 3 By 1 Matrix 1st Row 1 2nd Row 0 3rd Row 0 EndMatrix We go for the \lq simplest form' of the eigenvector (the simplest non-zero multiple of this) to get: eigenvector Start 3 By 1 Matrix 1st Row 1 2nd Row 0 3rd Row 0 EndMatrix corresponding to the eigenvalue lamda equals 2 period

Self-help

VideoIntroduction to eigenvalues and eigenvectors (YouTube video)Duration5:20