Matrices and Determinants

On this page:


Introduction and Examples

DEFINITION: A matrix is defined as an ordered rectangular array of numbers. They can be used to represent systems of linear equations, as will be explained below.

Here are a couple of examples of different types of matrices:

Symmetric Diagonal Upper Triangular Lower Triangular Zero Identity
Symmetric Matix Diagonal Matrix Upper Triangular Matix Lower Triangular Matix Zero Matix Identity Matix

And a fully expanded m×n matrix A, would look like this:

n×n matrix

... or in a more compact form: m×n simplified

Top

Matrix Addition and Subtraction

DEFINITION: Two matrices A and B can be added or subtracted if and only if their dimensions are the same (i.e. both matrices have the same number of rows and columns. Take:

matrices A&B

Addition

If A and B above are matrices of the same type then the sum is found by adding the corresponding elements aij + bij .

Here is an example of adding A and B together.

Sum of matrices A&B

Subtraction

If A and B are matrices of the same type then the subtraction is found by subtracting the corresponding elements aijbij.

Here is an example of subtracting matrices.

Subtraction of A&B

Now, try adding and subtracting your own matrices.

Addition/subtraction
Top

Matrix Multiplication

DEFINITION: When the number of columns of the first matrix is the same as the number of rows in the second matrix then matrix multiplication can be performed.

Here is an example of matrix multiplication for two 2×2 matrices.

Matrix multiplication 2×2

Here is an example of matrix multiplication for two 3×3 matrices.

Matrix multiplication 3×3

Now lets look at the n×n matrix case, Where A has dimensions m×n, B has dimensions n×p. Then the product of A and B is the matrix C, which has dimensions m×p. The ijth element of matrix C is found by multiplying the entries of the ith row of A with the corresponding entries in the jth column of B and summing the n terms. The elements of C are:

Matrix multiplication for n×n

Note: That A×B is not the same as B×A

Now, try multiplying your own matrices.

Matrix multiplication
Top

Transpose of Matrices

DEFINITION: The transpose of a matrix is found by exchanging rows for columns i.e. Matrix A = (aij) and the transpose of A is:

AT = (aji) where j is the column number and i is the row number of matrix A.

For example, the transpose of a matrix would be:

Transpose of matrix

In the case of a square matrix (m = n), the transpose can be used to check if a matrix is symmetric. For a symmetric matrix A = AT.

Symmetric matrix

Now try an example.

Transpose of a matrix
Top

The Determinant of a Matrix

DEFINITION: Determinants play an important role in finding the inverse of a matrix and also in solving systems of linear equations. In the following we assume we have a square matrix (m = n). The determinant of a matrix A will be denoted by det(A) or |A|. Firstly the determinant of a 2×2 and 3×3 matrix will be introduced, then the n×n case will be shown.

Determinant of a 2×2 matrix

Assuming A is an arbitrary 2×2 matrix A, where the elements are given by:

Matrix A

then the determinant of a this matrix is as follows:

Det A

Now try an example of finding the determinant of a 2×2 matrix yourself.

Determinant of 2×2

Determinant of a 3×3 matrix

The determinant of a 3×3 matrix is a little more tricky and is found as follows (for this case assume A is an arbitrary 3×3 matrix A, where the elements are given below).

Matrix A

then the determinant of a this matrix is as follows:

Det of A

Now try an example of finding the determinant of a 3×3 matrix yourself.

Determinant of 3×3

Determinant of a n×n matrix

For the general case, where A is an n×n matrix the determinant is given by:

Matrix A n×n

Where the coefficients αij are given by the relation:

alpha coefficient

where βij is the determinant of the (n-1) × (n-1) matrix that is obtained by deleting row i and column j. This coefficient αij is also called the cofactor of aij.

Top

The Inverse of a Matrix

DEFINITION: Assuming we have a square matrix A, which is non-singular (i.e. det(A) does not equal zero), then there exists an n×n matrix A-1 which is called the inverse of A, such that this property holds:

AA-1 = A-1A = I, where I is the identity matrix.

The inverse of a 2×2 matrix

Take for example a arbitury 2×2 Matrix A whose determinant (ad − bc) is not equal to zero.

2×2 matrix

where a,b,c,d are numbers, The inverse is:

Inverse of 2×2

Now try finding the inverse of your own 2×2 matrices.

Inverse of 2×2

The inverse of a n×n matrix

The inverse of a general n×n matrix A can be found by using the following equation.

Inverse

Where the adj(A) denotes the adjoint (or adjugate) of a matrix. It can be calculated by the following method:

Lastly to find the inverse of A divide the matrix CT by the determinant of A to give its inverse.

Now test this method with finding the inverse of your own 3×3 matrices.

Inverse of 3×3
Top

Solving Systems of Equations using Matrices

DEFINITION: A system of linear equations is a set of equations with n equations and n unknowns, is of the form of

n×n Systems of equations

The unknowns are denoted by x1, x2, ..., xn and the coefficients (a and b above) are assumed to be given. In matrix form the system of equations above can be written as:

n×n Systems of equations

A simplified way of writing above is like this: Ax = b

Now, try putting your own equations into matrix form.

Putting equations into matrices

After looking at this we will now look at two methods used to solve matrices. These are:

Top

Inverse Matrix Method

DEFINITION: The inverse matrix method uses the inverse of a matrix to help solve a system of equations, such like the above Ax = b. By pre-multiplying both sides of this equation by A-1 gives:

Ax=b derivation

or alternatively

Ax=b derivation

So by calculating the inverse of the matrix and multiplying this by the vector b we can find the solution to the system of equations directly. And from earlier we found that the inverse is given by

Inverse

From the above it is clear that the existence of a solution depends on the value of the determinant of A. There are three cases:

  1. If the det(A) does not equal zero then solutions exist using Ax=b derivation
  2. If the det(A) is zero and b=0 then the solution will be not be unique or does not exist.
  3. If the det(A) is zero and b=0 then the solution can be x = 0 but as with 2. is not unique or does not exist.

Looking at two equations we might have that

Inverse

Written in matrix form would look like

Inverse

and by rearranging we would get that the solution would look like

Inverse

Now try solving your own two equations with two unknowns.

Inverse Method 2×2

Similarly for three simultaneous equations we would have:

Inverse

Written in matrix form would look like

Inverse

and by rearranging we would get that the solution would look like

Inverse

Now try solving your own three equations with three unknowns.

Inverse Method 3×3
Top

Cramer's Rule

DEFINITION: Cramer's rule uses a method of determinants to solve systems of equations. Starting with equation below,

n×n Systems of equations

The first term x1 above can be found by replacing the first column of A by b×n. Doing this we obtain:

n×n Systems of equations

Similarly for the general case for solving xr we replace the rth column of A by b×n and expand the determinant. This method of using determinants can be applied to solve systems of linear equations. We will illustrate this for solving two simultaneous equations in x and y and three equations with 3 unknowns x, y and z.

Two simultaneous equations in x and y

2×2 equations

To solve use the following:

or simplified:

Now try solving two of your own equations.

Cramers 2×2

Three simultaneous equations in x, y and z

 ax + by + cz = p
 dx + ey + fz = q
 gx + hy + iz = r

To solve use the following:

Now try solving your own three equations.

Cramers 2×2
Home Forward