0% found this document useful (0 votes)
28 views

Chapter 6 - Matrices and Determinants

The document provides an overview of matrices, systems of equations, and operations with matrices, including definitions, types, and properties. It explains how to convert systems of linear equations into matrices, perform elementary row operations, and achieve row-echelon and reduced row-echelon forms. Additionally, it discusses matrix operations such as addition, subtraction, multiplication, and the concept of matrix inverses, emphasizing that matrix division is not defined.

Uploaded by

Sadiq Marwat
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Chapter 6 - Matrices and Determinants

The document provides an overview of matrices, systems of equations, and operations with matrices, including definitions, types, and properties. It explains how to convert systems of linear equations into matrices, perform elementary row operations, and achieve row-echelon and reduced row-echelon forms. Additionally, it discusses matrix operations such as addition, subtraction, multiplication, and the concept of matrix inverses, emphasizing that matrix division is not defined.

Uploaded by

Sadiq Marwat
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 44

6.

1 - Matrices and Systems of Equations

Definition of a Matrix
 Rectangular array of real numbers
 m rows by n columns
 Named using capital letters
 First subscript is row, second subscript is column

Terminology
 A matrix with m rows and n columns is called a matrix of order m x n.
 A square matrix is a matrix with an equal number of rows and columns.
Since the number of rows and columns are the same, it is said to have
order n.
 The main diagonal of a square matrix are the elements from the upper
left to the lower right of the matrix.
 A row matrix is a matrix that has only one row.
 A column matrix is a matrix that has only one column.
 A matrix with only one row or one column is called a vector.

Converting Systems of Linear Equations to Matrices


Each equation in the system becomes a row. Each variable in the system
becomes a column. The variables are dropped and the coefficients are placed
into a matrix. If the right hand side is included, it's called an augmented matrix.
If the right hand side isn't included, it's called a coefficient matrix.

The system of linear equations ...


x + y - z = 1
3x - 2y + z = 3
4x + y - 2z = 9

becomes the augmented matrix ...


x y z rhs
1 1 -1 1
3 -2 1 3
4 1 -2 9

Elementary Row Operations


Elementary Row Operations are operations that can be performed on a matrix
that will produce a row-equivalent matrix. If the matrix is an augmented matrix,
constructed from a system of linear equations, then the row-equivalent matrix
will have the same solution set as the original matrix.

When working with systems of linear equations, there were three operations
you could perform which would not change the solution set.

1. Interchange two equations.


2. Multiply an equation by a non-zero constant.
3. Multiply an equation by a non-zero constant and add it to another
equation, replacing that equation.

When a system of linear equations is converted to an augmented matrix, each


equation becomes a row. So, there are now three elementary row operations
which will produce a row-equivalent matrix.

1. Interchange two rows


2. Multiply a row by a non-zero constant
3. Multiply a row by a non-zero constant and add it to another row,
replacing that row.

Row-Echelon and Reduced Row-Echelon Forms


These are Row-equivalent forms of a matrix. One can easily solve a system of
linear equations when matrices are in one of these forms.

Row-Echelon Form

A matrix is in row-echelon form when the following conditions are met.

1. If there is a row of all zeros, then it is at the bottom of the matrix.


2. The first non-zero element of any row is a one. That element is called
the leading one.
3. The leading one of any row is to the right of the leading one of the
previous row.

Notes

 The leading one of a row does not have to be to the immediate right of
the leading one of the previous row.
 A matrix in row-echelon form will have zeros below the leading ones.
 Gaussian Elimination places a matrix into row-echelon form, and then
back substitution is required to finish finding the solutions to the system.
 The row-echelon form of a matrix is not necessarily unique.

Reduced Row-Echelon Form

A matrix is in reduced row-echelon form when all of the conditions of row-


echelon form are met and all elements above, as well as below, the leading
ones are zero.

1. If there is a row of all zeros, then it is at the bottom of the matrix.


2. The first non-zero element of any row is a one. That element is called
the leading one.
3. The leading one of any row is to the right of the leading one of the
previous row.
4. All elements above and below a leading one are zero.

Notes

 The leading one of a row does not have to be to the immediate right of
the leading one of the previous row.
 A matrix in row-echelon form will have zeros both above and below the
leading ones.
 Gauss-Jordan Elimination places a matrix into reduced row-echelon
form.
 No back substitution is required to finish finding the solutions to the
system.
 The reduced row-echelon form of a matrix is unique.

Gaussian Elimination
 Write a system of linear equations as an augmented matrix
 Perform the elementary row operations to put the matrix into row-
echelon form
 Convert the matrix back into a system of linear equations
 Use back substitution to obtain all the answers

Gauss-Jordan Elimination

 Write a system of linear equations as an augmented matrix


 Perform the elementary row operations to put the matrix into reduced
row-echelon form
 Convert the matrix back into a system of linear equations
 No back substitution is necessary

Pivoting

 Pivoting is a process which automates the row operations necessary to


place a matrix into row-echelon or reduced row-echelon form
 In particular, pivoting makes the elements above or below a leading one
into zeros

Types of Solutions
There are three types of solutions which are possible when solving a system
of linear equations

Independent

 Consistent
 Unique Solution
 A row-reduced matrix has the same number of non-zero rows as
variables
 The left hand side is usually the identity matrix, but not necessarily
 There must be at least as many equations as variables to get an
independent solution.

x y z rhs
1 00 3
0 10 1
0 01 2
When you convert the augmented matrix back into equation form, you get
x=3, y=1, and z=2.

Dependent

 Consistent
 Many solutions
 Write answer in parametric form
 A row-reduced matrix has more variables than non-zero rows
 There doesn't have to be a row of zeros, but there usually is.
 This could also happen when there are less equations than variables.

x y z rhs
1 0 3 4
0 1 -2 3
0 0 0 0
The first equation will be x + 3z = 4. Solving for x gives x = 4 - 3z.
The second equation will be y - 2z = 3. Solving for y gives y = 3 + 2z.
The z column is not cleared out (all zeros except for one number) so the other
variables will be defined in terms of z. Therefore, z will be the parameter t and
the solution is ...

x = 4 - 3t, y = 3 + 2t, z = t

Inconsistent

 No Solution
 A row-reduced matrix has a row of zeros on the left side, but the right
hand side isn't zero.

x y z rhs
1 0 3 4
0 1 -2 3
0 0 0 2

There is no solution here. You can write that as the null set Ø, the empty set
{}, or no solution.
6.2 - Operations with Matrices
Equality

Two matrices are equal if and only if

 The order of the matrices are the same


 The corresponding elements of the matrices are the same

Addition

 Order of the matrices must be the same


 Add corresponding elements together
 Matrix addition is commutative
 Matrix addition is associative

Subtraction

 The order of the matrices must be the same


 Subtract corresponding elements
 Matrix subtraction is not commutative (neither is subtraction of real
numbers)
 Matrix subtraction is not associative (neither is subtraction of real
numbers)

Scalar Multiplication

A scalar is a number, not a matrix.

 The matrix can be any order


 Multiply all elements in the matrix by the scalar
 Scalar multiplication is commutative
 Scalar multiplication is associative

Zero Matrix

 Matrix of any order


 Consists of all zeros
 Denoted by capital O
 Additive Identity for matrices
 Any matrix plus the zero matrix is the original matrix
Matrix Multiplication

Am×n × Bn×p = Cm×p

 The number of columns in the first matrix must be equal to the number
of rows in the second matrix. That is, the inner dimensions must be the
same.
 The order of the product is the number of rows in the first matrix by the
number of columns in the second matrix. That is, the dimensions of the
product are the outer dimensions.
 Since the number of columns in the first matrix is equal to the number of
rows in the second matrix, you can pair up entries.
 Each element in row i from the first matrix is paired up with an element
in column j from the second matrix.
 The element in row i, column j, of the product is formed by multiplying
these paired elements and summing them.
 Each element in the product is the sum of the products of the elements
from row i of the first matrix and column j of the second matrix.
 There will be n products which are summed for each element in the
product.

See a complete example of matrix multiplication.

Matrix multiplication is not commutative

 Multiplication of real numbers is.


 The inner dimensions may not agree if the order of the matrices is
changed.

Do not simply multiply corresponding elements together

 Since the order (dimensions) of the matrices don't have to be the same,
there may not be corresponding elements to multiply together.
 Multiply the rows of the first by the columns of the second and add.

There is no matrix division

 There is no defined process for dividing a matrix by another matrix.


 A matrix may be divided by a scalar.
Identity Matrix

 Square matrix
 Ones on the main diagonal
 Zeros everywhere else
 Denoted by I. If a subscript is included, it is the order of the identity
matrix.
 I is the multiplicative identity for matrices
 Any matrix times the identity matrix is the original matrix.
 Multiplication by the identity matrix is commutative, although the order of
the identity may change

Identity matrix of size 2

1 0
I2 =
0 1

Identity matrix of size 3

1 0 0

I3 = 0 1 0

0 0 1

Properties of Matrices

Property Example

Commutativity of Addition A+B=B+A

Associativity of Addition A+(B+C)=(A+B)+C

Associativity of Scalar Multiplication (cd) A = c (dA)


Scalar Identity 1A = A(1) = A

Distributive c (A + B) = cA + cB

Distributive (c + d) A = cA + dA

Additive Identity A+O=O+A=A

Associativity of Multiplication A (BC) = (AB) C

Left Distributive A (B + C) = AB + AC

Right Distributive ( A + B ) C = AC + BC

Scalar Associativity / Commutativity c (AB) = (cA) B = A (cB) = (AB) c

Multiplicative Identity IA = AI = A

Properties of Real Numbers that aren't Properties of Matrices


Commutativity of Multiplication

 You can not change the order of a multiplication problem and expect to
get the same product. AB≠BA
 You must be careful when factoring common factors to make sure they
are on the same side. AX+BX = (A+B)X and XA + XB = X(A+B) but AX
+ XB doesn't factor.

Zero Product Property

 Just because a product of two matrices is the zero matrix does not
mean that one of them was the zero matrix.

Multiplicative Property of Equality

 If A=B, then AC = BC. This property is still true, but the converse is not
necessarily true. Just because AC = BC does not mean that A = B.
 Because matrix multiplication is not commutative, you must be careful to
either pre-multiply or post-multiply on both sides of the equation. That is,
if A=B, then AC = BC or CA = CB, but AC≠CB.

There is no matrix division

 You must multiply by the inverse of the matrix

Evaluating a Function using a Matrix

Consider the function f(x) = x2 - 4x + 3 and the matrix A

1 2
A
=
3 4

The initial attempt to evaluate the f(A) would be to replace every x with an A to
get f(A) = A2 - 4A + 3. There is one slight problem, however. The constant 3 is
not a matrix, and you can't add matrices and scalars together. So, we multiply
the constant by the Identity matrix.

f(A) = A2 - 4A + 3I.

Evaluate each term in the function and then add them together.

1 2 1 2 7 10
A2 = * =
3 4 3 4 15 22

1 2 -4 -8
-4 A = -4 =
3 4 -12 -16

1 0 3 0
3I = 3 =
0 1 0 3
7 10 -4 -8 3 0 6 2
f(A) = + + =
15 22 -12 -16 0 3 3 9

Factoring Expressions

Some examples of factoring are shown. Simplify and solve like normal, but
remember that matrix multiplication is not commutative and there is no matrix
division.

2X + 3X = 5X
AX + BX = (A+B)X
XA + XB = X(A+B)
AX + 5X = (A+5I)X
AX+XB does not factor
Solving Equations

A system of linear equations can be written as AX=B where A is the coefficient


matrix, X is a column vector containing the variables, and B is the right hand
side. We'll learn how to solve this equation in the next section.

If there are more than one system of linear equations with the same
coefficient matrix, then you can expand the B matrix to have more than one
column. Put each right hand side into its own column.

Matrix Multiplication

Matrix multiplication involves summing a product. It is appropriate where you


need to multiply things together and then add. As an example, multiplying the
number of units by the per unit cost will give the total cost.

The units on the product are found by performing unit analysis on the
matrices. The labels for the product are the labels of the rows of the first
matrix and the labels of the columns of the second matrix.

6.3 - The Inverse of a Square Matrix


Real Numbers

When working in the real numbers, the equation ax=b could be solved for x by
dividing both sides of the equation by a to get x=b/a, as long as a wasn't zero.
It would therefore seem logical that when working with matrices, one could
take the matrix equation AX=B and divide both sides by A to get X=B/A.

However, that won't work because ...

There is NO matrix division!

Ok, you say. Subtraction was defined in terms of addition and division was
defined in terms of multiplication. So, instead of dividing, I'll just multiply by the
inverse. This is the way that it has to be done.

The Inverse of a Matrix

So, what is the inverse of a matrix?

Well, in real numbers, the inverse of any real number a was the number a-1,
such that a times a-1 equaled 1. We knew that for a real number, the inverse of
the number was the reciprocal of the number, as long as the number wasn't
zero.

The inverse of a square matrix A, denoted by A-1, is the matrix so that the
product of A and A-1 is the Identity matrix. The identity matrix that results will
be the same size as the matrix A. Wow, there's a lot of similarities there
between real numbers and matrices. That's good, right - you don't want it to
be something completely different.

A(A-1) = I or A-1(A) = I

There are a couple of exceptions, though. First of all, A-1 does not mean 1/A.
Remember, "There is no Matrix Division!" Secondly, A-1 does not mean take
the reciprocal of every element in the matrix A.

Requirements to have an Inverse

1. The matrix must be square (same number of rows and columns).


2. The determinant of the matrix must not be zero (determinants are
covered in section 6.4). This is instead of the real number not being
zero to have an inverse, the determinant must not be zero to have an
inverse.

A square matrix that has an inverse is called invertible or non-singular. A


matrix that does not have an inverse is called singular.

A matrix does not have to have an inverse, but if it does, the inverse is unique.

Finding the Inverse the Hard Way

The inverse of a matrix A will satisfy the equation A(A-1) = I.

1. Adjoin the identity matrix onto the right of the original matrix, so that you
have A on the left side and the identity matrix on the right side. It will
look like this [ A | I ].
2. Row-reduce (I suggest using pivoting) the matrix until the left side is the
Identity matrix. When the left side is the Identity matrix, the right side will
be the Inverse [ I | A-1 ]. If you are unable to obtain the identity matrix on
the left side, then the matrix is singular and has no inverse.
3. Take the augmented matrix from the right side and call that the inverse.

Shortcut to the Finding the Inverse of a 2×2 Matrix

The inverse of a 2×2 matrix can be found by ...

1. Switch the elements on the main diagonal


2. Take the opposite of the other two elements
3. Divide all the values by the determinant of the matrix (since we haven't
talked about the determinant, for a 2×2 system, it is the product of the
elements on the main diagonal minus the product of the other two
elements).

Example for the shortcut

Let's go with an original matrix of

7 -2

3 5
Step 1, switch the elements on the main diagonal would involve switching the
5 and 7.

5 -2

3 7

Step 2, take the opposite of the other two elements, but leave them where
they are.

5 2

-3 7

Step 3, find the determinant and divide every element by that. The
determinant is the product of the elements on the main diagonal minus the
product of the elements off the main diagonal. That means the determinant of
this matrix is 7(5) - (-3)(2) = 35 + 6 = 41. We divide every element by 41.

The inverse of the original matrix is ...

5/41 2/4
1

-3/41 7/4
1

Now, you're saying, wait a minute - you said there was no matrix division.
There is no division by a matrix. You may multiply or divide a matrix by a
scalar (real number) and the determinant is a scalar.

Using the Calculator

Now that you know how to find the identity matrix by hand, let's talk
practicality. The calculator will do it for you.
Entering a Matrix

1. Press the Matrix key (right below the X key). On the TI-83+, you will
need to hit 2nd Matrix.
2. Arrow to the Edit submenu.
3. Choose a Matrix to work with. You have five to choose from with the TI-
82 and ten to choose from with the TI-83. Typically, you will use [A]. Try
to avoid using [E] for unspecified reasons that will be specified if you
take Finite Mathematics.
4. Enter the number of rows, press enter, and then enter the number of
columns, followed by enter.
5. You now enter each element in the matrix, reading from left to right and
top to bottom. Press enter after each number. You may use the arrow
keys to move around if you make a mistake.
6. Quit (2nd Mode) when you are done entering all the numbers.

Using Matrices

Whenever you need to access a matrix that you have created, just hit the
Matrix key and choose the appropriate matrix. I would suggest that you start
using Matrix 1, Matrix 2, etc, instead of Matrix, arrow down, enter. It will go
faster, and you will be doing a lot with these matrices.

Finding the Inverse of a Matrix on a Calculator

Enter the expression [A]-1 by going Matrix 1, and then hitting the x-1 key. It will
not work if you try to raise the matrix to the -1 power as in [A]^(-1).

You may have to use the right or left arrow keys to scroll through the entire
matrix to write it down. Please give exact answers whenever possible.

One way of giving exact answers is to have the calculator convert the
decimals to fractions for you. After all, fractions really are your friends (and I
seriously mean that here). You can have the calculator do a decimal to
fraction conversion by hitting Math, Enter, Enter.

Also, if you get an answer like 1.2E-12, chances are really good that number
is zero and it is because of inaccuracies in the calculator that you are getting
that response. Convert the number to zero.
Why was it we needed an inverse?

I am so glad you asked that.

One of the major uses of inverses is to solve a system of linear equations.


You can write a system in matrix form as AX = B.

Now, pre-multiply both sides by the inverse of A. Make sure you meet these
two conditions.

1. You must place the inverse of the matrix adjacent to the matrix. That is
because Inverses need to be next to each other (very loose
mathematically, but think back to functions) in order to undo each other.
2. If you multiply by putting something in front of the left side (pre-multiply),
it has to go in front of the right side. If you put something behind (post-
multiply) the left side, it has to go behind the right side.

Matrix Multiplication is NOT Commutative!

A-1(AX) = A-1(B) ... pre-multiply both sides by A-1


(A-1A) X = A-1 B ... use the associative property to regroup factors
I X = A-1 B ... when you multiply inverses together, they become the identity
matrix
X = A-1 B ... the identity matrix is like multiplying by 1.

If AX = B, then X = A-1 B

So what you're asking in your normal cynical way is "You've just solved
another equation, what does that have to do with anything?"

Solving Systems of Linear Equations

Consider the system of linear equations


3x + 2y - 5z = 12
x - 3y + 2z = -13
5x - y + 4z = 10

Write the coefficients in an A matrix.


x y z

3 2 -5

1 -3 2

5 -1 4

Write the variables in an X matrix.

Write the constants in a B matrix.

12

-13

10

Verify that AX = B

This step isn't really needed, but I wanted to show you that this thing really
does work.

AX will be a (3×3) × (3×1) = 3×1 matrix. The B matrix is also a 3×1 matrix, so
at least the dimensions work out right.

Here's A times X.

3 2 -5 x 3x + 2y - 5z

1 -3 2 y = 1x - 3y + 2z
5 -1 4 z 5x - 1y + 4z

Notice that turns out to be the left side of the system of equations. The B is
the right hand side, so we have achieved equality. Woohoo! You can write a
system of linear equations as AX = B.

So, if you can write a system of linear equations as AX=B where A is the
coefficient matrix, X is the variable matrix, and B is the right hand side, you
can find the solution to the system by X = A-1 B.

Place the coefficient matrix into [A] on the calculator and the right hand side
into [B].

If you asked the calculator to find the inverse of the coefficient matrix, it would
give you this for A-1

5/44 3/88 1/8

-3/44 -37/88 1/8

-7/44 -13/88 1/8

You could do that, and then multiply that by B, but it would be easier just to
put the whole expression into the calculator and get the answer directly. Even
what is shown below is more work than is necessary.

X = A-1 B = ...

x 5/44 3/88 1/8 12 191/8


8

y = -3/44 -37/88 1/8 -13 = 519/8


8

z -7/44 -13/88 1/8 10 111/8


8

There you go, x = 191/88, y = 519/88, and z = 111/88. That would be a real
pain to solve by hand.

This is easy, why don't we always do this?

The main reason is because it doesn't always work.

1. Inverses only exist for square matrices. That means if you don't the
same number of equations as variables, then you can't use this method.
2. Not every square matrix has an inverse. If the coefficient matrix A is
singular (has no inverse), then there may be no solution or there may be
many solutions, but we can't tell what it is.
3. Inverses are a pain to find by hand. If you have a calculator, it's not so
bad, but remember that calculators don't always give you the answer
you're looking for.

6.4 - The Determinant of a Square Matrix


A determinant is a real number associated with every square matrix. I have
yet to find a good English definition for what a determinant is. Everything I can
find either defines it in terms of a mathematical formula or suggests some of
the uses of it. There's even a definition of determinant that defines it in terms
of itself.

The determinant of a square matrix A is denoted by "det A" or | A |. Now, that


last one looks like the absolute value of A, but you will have to apply context.
If the vertical lines are around a matrix, it means determinant.

The line below shows the two ways to write a determinant.

3 1 3 1
de
=
t
5 2 5 2
Determinant of a 2×2 Matrix

The determinant of a 2×2 matrix is found much like a pivot operation. It is the
product of the elements on the main diagonal minus the product of the
elements off the main diagonal.

a b
= ad - bc
c d

Properties of Determinants

 The determinant is a real number, it is not a matrix.


 The determinant can be a negative number.
 It is not associated with absolute value at all except that they both use
vertical lines.
 The determinant only exists for square matrices (2×2, 3×3, ... n×n). The
determinant of a 1×1 matrix is that single value in the determinant.
 The inverse of a matrix will exist only if the determinant is not zero.

Expansion using Minors and Cofactors

The definition of determinant that we have so far is only for a 2×2 matrix.
There is a shortcut for a 3×3 matrix, but I firmly believe you should learn the
way that will work for all sizes, not just a special case for a 3×3 matrix.

The method is called expansion using minors and cofactors. Before we can
use them, we need to define them.

Minors

A minor for any element is the determinant that results when the row and
column that element are in are deleted.

The notation Mij is used to stand for the minor of the element in row i and
column j. So M21 would mean the minor for the element in row 2, column 1.

Consider the 3×3 determinant shown below. I've included headers so that you
can keep the rows and columns straight, but you wouldn't normally include
those. We're going to find some of the minors.
C1 C2 C3

R1 1 3 2

R2 4 1 3

R3 2 5 2

Finding the Minor for R2C1

The minor is the determinant that remains when you delete the row and
column of the element you're trying to find the minor for. That means we
should delete row 2 and column 1 and then find the determinant.

C2 C3

R1 3 2
= 3(2) - 5(2) = 6 - 10 = -4
R3 5 2

As you can see, the minor for row 2 and column 1 is M21 = -4.

Let's try another one.

Finding the Minor for R3C2

This time, we would delete row 3 and column 2.

C1 C3

R1 1 2
= 1(3) - 4(2) = 3 - 8 = -5
R2 4 3

So the minor for row 3, column 2 is M32 = -5.


Matrix of Minors

When you're just trying to find the determinant of a matrix, this is overkill. But
there is one extremely useful application for it and it will give us practice
finding minors.

The matrix of minors is the square matrix where each element is the minor for
the number in that position.

Here is a generic matrix of minors for a 3×3 determinant.

C1 C2 C3

R1 M11 M12 M13

R2 M21 M22 M23

R3 M31 M32 M33

Let's find the matrix of minors for our original determinant. Here is the
determinant.

C1 C2 C3

R1 1 3 2

R2 4 1 3

R3 2 5 2

Here is the work to find each minor in the matrix of minors.

C1 C2 C3

R1 1 3 4 3 4 1

5 2 2 2 2 5
= 2 - 15 = -13 =8-6=2 = 20 - 2 = 18

R2 3 2 1 2 1 3

5 2 2 2 2 5

= 6 - 10 = -4 = 2 - 4 = -2 = 5 - 6 = -1

R3 3 2 1 2 1 3

1 3 4 3 4 1

=9-2=7 = 3 - 8 = -5 = 1 - 12 = -11

Finally, here is the matrix of minors. Again, you don't need to put the labels for
the row and columns on there, but it may help you.

C1 C2 C3

R1 -13 2 18

R2 -4 -2 -1

R3 7 -5 -11

Cofactors

A cofactor for any element is either the minor or the opposite of the minor,
depending on where the element is in the original determinant. If the row and
column of the element add up to be an even number, then the cofactor is the
same as the minor. If the row and column of the element add up to be an odd
number, then the cofactor is the opposite of the minor.

Ooh - did you get that? Odd changes signs, even is the same sign. Deja Vu.
We've been talking about that ever since section 3.2 on polynomials.
Sign Chart

Rather than adding up the row and column of the element to see whether it is
odd or even, many people prefer to use a sign chart. A sign chart is either a +
or - for each element in the matrix. The first element (row 1, column 1) is
always a + and it alternates from there.

Note: The + does not mean positive and the - negative. The + means the
same sign as the minor and the - means the opposite of the minor. Think of it
addition and subtraction rather than positive or negative.

Here is the sign chart for a 2×2 determinant.

C1 C2

R1 + -

R2 - +

Here is the sign chart for a 3×3 determinant.

C1 C2 C3

R1 + - +

R2 - + -

R3 + - +

Matrix of Cofactors

Again, if all you're trying to do is find the determinant, you do not need to go
through this much work.

The matrix of cofactors is the matrix found by replacing each element of a


matrix by its cofactor. This is the matrix of minors with the signs changed on
the elements in the - positions.

C1 C2 C3
R1 -13 -2 18

R2 4 -2 1

R3 7 5 -11

Expanding to Find the Determinant

Here are the steps to go through to find the determinant.

1. Pick any row or column in the matrix. It does not matter which row or
which column you use, the answer will be the same for any row. There
are some rows or columns that are easier than others, but we'll get to
that later.
2. Multiply every element in that row or column by its cofactor and add.
The result is the determinant.

Let's expand our matrix along the first row.

1 3 2

4 1 3

2 5 2

From the sign chart, we see that 1 is in a positive position, 3 is in a negative


position and 2 is in a positive position. By putting the + or - in front of the
element, it takes care of the sign adjustment when going from the minor to the
cofactor.

1 3 4 3 4 1
+
-3 +2
1
5 2 2 2 2 5

= 1 ( 2 - 15 ) - 3 ( 8 - 6 ) + 2 ( 20 - 2 )
= 1 ( -13 ) - 3 ( 2 ) + 2 (18)
= -13 - 6 + 36
= 17

The determinant of this matrix is 17.

As I said earlier, it doesn't really matter which row or column you use.

Let's try it again, but this time expand on the second columns. As an effort to
save time, the minors for that column (from the matrix of minors) were 2, -2,
and -5. The original elements were 3, 1, and 5. The 3 and 5 are in negative
positions.

determinant = - 3 ( 2 ) + 1 ( -2 ) - 5 ( -5 ) = -6 -2 + 25 = 17

Expand on any row or any column, you'll get 17.

However, you can't do diagonals. If we try the main diagonal, you get

+ 1 ( -13 ) + 1 ( -2 ) + 2 ( -11 ) = -13 -2 - 22 = -37

Some rows or columns are better than others

1. Pick the row or column with the most zeros in it.


Since each minor or cofactor is multiplied by the element in the matrix,
picking a row or column with lots of zeros in it means that you will be
multiplying by a lot of zeros. Multiplying by zero doesn't take very long at
all. In fact, if the element is zero, you don't need to even find the minor
or cofactor.
2. Pick the row or column with the largest numbers (or variables) in it.
The elements in the row or column that you expand along are not used
to find the minors. The only place that they are multiplied is once, in the
expansion. If you pick the row or column with the smallest numbers,
then every minor will be the product of larger numbers.
If you pick a row or column that has variables in it, then you will only
have to multiply by the variables once, during the expansion.

Inverse of a Matrix (revisited)

Let's consider our original determinant as a matrix this time.

1 32
4 13

2 52

Find the matrix of minors as explained above.

-13 2 18

-4 -2 -1

7 -5 -11

Turn it into a matrix of cofactors by changing the signs on the appropriate


elements based on the sign chart.

-13 -2 18

4 -2 1

7 5 -11

Find the adjoint by transposing the matrix of cofactors.

To transpose a matrix, you switch the rows and columns. That is, the rows
become columns and the columns become rows. The Transpose of a matrix
can be found using the TI-82 or TI-83 calculator by entering the name of the
matrix and then choosing Matrix, Math, and then option 2, a superscripted T,
like [A]T.

-13 4 7

-2 -2 5

18 1 -11
Finally divide the adjoint of the matrix by the determinant of the matrix. In this
problem, the determinant is 17, so we'll divide every element by 17. The
resulting matrix is the inverse of the original matrix.

-13/17 4/17 7/17

-2/17 - 5/17
2/17

18/17 1/17 -11/17

The inverse of a matrix is found by dividing the adjoint of the matrix by the
determinant of the matrix. Don't try that on your calculator since the calculator
won't let you divide a matrix by a scalar. You will have to multiply by the
inverse of the determinant instead.

If you check it with your calculator, you can verify that the inverse actually is
the adjoint divided by the determinant.

Since the inverse is the adjoint divided by the determinant, we can see why
the inverse doesn't exist if the determinant is zero. That would cause division
by zero, which is undefined.

Larger Order Determinants

Let's find the determinant of a 4x4 system.

C1 C2 C3 C4

R1 3 2 0 1

R2 4 0 1 2

R3 3 0 2 1

R4 9 2 3 1
Pick the row or column with the most zeros in it. In this case, that is the
second column.

For each element in the original matrix, its minor will be a 3×3 determinant.
We'll have to expand each of those by using three 2×2 determinants.

This is why we want to expand along the second column. The minors are
multiplied by their elements, so if the element in the original matrix is 0, it
doesn't really matter what the minor is and we can save a lot of time by not
having to find it. In the second column, you won't need to find two of the
minors because their corresponding element in the second column is zero.

4 1 2 3 0 1
- + - +
3 2 1 ? ? 4 1 2
2 0 0 2
9 3 1 3 2 1

We could actually fill in those middle two minors, but since they're multiplied
by 0, it doesn't really matter what they are. In fact, you could just as easily skip
them.

Now, there are two 3x3 determinants left to find.

In the first 3x3 determinant, there are no zeros, so pick the row or column with
the largest numbers. That would be column 1, so expand along the first
column.

Notice the 4 is in a positive position. The sign charts begin over with each new
determinant. The position of the number in the original matrix does not matter,
only its position in the current matrix.

4 1 2

3 2 1 = +4 2 1 -3 1 2 +9 1 2

9 3 1 3 1 3 1 2 1
= 4 ( 2 - 3 ) - 3 ( 1 - 6 ) + 9 ( 1 - 4 ) = 4 ( -1 ) - 3 ( -5 ) + 9 ( -3 ) = -4 + 15 - 27 =
-16

Consider the other 3×3 matrix. In this one, there is a 0 in the row 1 and
column 2. Either one of those would be a good pick for expansion, but since
row 1 has slightly larger numbers, we'll expand along the first row.

3 0 1

4 1 2 = +3 1 2 -0 ? ? +1 4 1

3 2 1 2 1 ? ? 3 2

= 3 ( 1 - 4 ) - 0 ( doesn't matter ) + 1 ( 8 - 3 ) = 3 ( -3 ) + 1 ( 5 ) = -9 + 5 = -4

When you go to find the determinant, remember that there were elements
from the original 4×4 matrix that were times each of those 3×3 determinants.
The first one was -2 and the second one was +2.

Determinant = -2 ( -16 ) + 2 ( -4 ) = 32 - 8 = 24

Worst case scenario

To find a 3x3 determinant with no zeros, you have to find three 2x2
determinants.

To find a 4x4 determinant with no zeros, you have to find four 3x3
determinants, each of which then becomes three 2x2 determinants for a total
of twelve 2x2 determinants.

To find a 5x5 determinant with no zeros, you have to find five 4x4
determinants, each of which then becomes four 3x3 determinants, each of
those becoming three 2x2 determinants for a total of sixty 2x2 determinants.

Using the Calculator

After that last problem, you've got to be asking yourself if there isn't an easier
way. Well, yes, there is, as long as the determinant doesn't have any variables
in it. You can use the calculator.
The notation that the TI-82 or TI-83 calculator uses is the Det A notation. So,
after entering the matrix into one of the available matrices on the calculator,
enter DET by going Matrix, Math, and choosing option 1. Then put in the
name of the matrix that you're using.

You don't need to use parentheses (unless you have a TI-83), but you can if
you want to find the determinant of a product "det ([A]*[B])" or the determinant
of a transpose "det ([A]T)" as opposed to the transpose of the determinant
"(det [A])T". By the way, the calculator won't find the transpose of a
determinant because the determinant is a scalar (real number) and the
calculator only knows how to find the transpose of a matrix. The transpose of
a scalar is that scalar.

Triangular Matrices

You're really going to like finding determinants of these matrices.

Upper Triangular Matrix

A matrix in which all the non-zero elements are either on or above the
main diagonal. That is, all the non-zero values are in the upper triangle.
Everything below the diagonal is a zero.

Lower Triangular Matrix

A matrix in which all the non-zero elements are either on or below the
main diagonal.

That is, all the non-zero values are in the lower triangle. Everything
above the diagonal is zero.

Diagonal Matrix

A matrix in which all the non-zero elements are on the main diagonal.
Everything off the main diagonal is a zero.

The determinant of a triangular matrix or a diagonal matrix is the product of


the elements on the main diagonal.
Elementary Row Operations

There were three elementary row operations that could be performed that
would return an equivalent system. With determinants, since the determinant
of a transpose is the same as the determinant of the matrix, the elementary
row operations can also be applied to columns.

By performing row-reduction (using pivoting on a 1 if you like), you can place


a matrix into triangular form. Once it's in triangular form, then all you have to
do is multiply by the elements on the main diagonal and you have the
determinant.

Let's look at each of the three elementary row operations.

1. If you interchange two rows or two columns in a determinant, the


resulting determinant will differ only in sign. That is, if you swap rows or
columns, the resulting determinant is the opposite of the original
determinant.
2. If you multiply a row or column by a non-zero constant, the determinant
is multiplied by that same non-zero constant.
3. If you multiply a row or column by a non-zero constant and add it to
another row or column, replacing that row or column, there is no change
in the determinant.

That last operation is equivalent to pivoting on a one!

Warning, if your pivot is a number other than one, then you are multiplying
each row that you change by the pivot element. So, if you pivot on a 3 and
you change two rows, then the resulting determinant will be 3*3 = 9 times as
great as the original determinant.

As long as you pivot on a one, you'll be okay.

You do not have to place the matrix into reduced row-echelon form or even
row-echelon form. You are free to stop the reduction at any point and expand
using minors and cofactors. What I suggest is pivot where there is a one, and
then expand.

Determinants that are Zero

The determinant of a matrix will be zero if


1. An entire row is zero.
2. Two rows or columns are equal.
3. A row or column is a constant multiple of another row or column.

Remember, that a matrix is invertible, non-singular, if and only if the


determinant is not zero. So, if the determinant is zero, the matrix is singular
and does not have an inverse.

6.5 - Applications of Matrices and


Determinants

Area of a Triangle

Consider a triangle with vertices at (x1,y1), (x2,y2), and (x3,y3). If the triangle
was a right triangle, it would be pretty easy to compute the area of the triangle
by finding one-half the product of the base and the height.

However, when the triangle is not a right triangle, there are a couple of other
ways that the area can be found.
Heron's Formula

If you know the lengths of the


three sides of the triangle, you can use Heron's Formula to find the area of the
triangle.

In Heron's formula, s is the semi-perimeter (one-half the perimeter of the


triangle).

s = 1/2 ( a + b + c )
Area = sqrt ( s ( s-a) ( s-b) ( s-c) )

Consider the triangle with vertices at (-2,2), (1,5), and (6,1).

Using the distance formulas, we can find that the lengths of the sides
(arbitrarily assigning a, b, and c) are a = 3 sqrt(2), b = sqrt(61), and c =
sqrt(73).

Using those values gives us ...

s = 1/2 ( 3 sqrt(2) + sqrt(61) + sqrt(73) )


s - a = 1/2 ( - 3 sqrt(2) + sqrt(61) + sqrt(73) )
s - b = 1/2 ( 3 sqrt(2) - sqrt(61) + sqrt(73) )
s - c = 1/2 ( 3 sqrt(2) + sqrt(61) - sqrt(73) )

s ( s - a ) ( s - b ) ( s - c ) = 1089 / 4

When you take the square root of that, you get 33/2, so the area of that
triangle is 16.5.
Problems with Heron's Formula include

 Must know the lengths of the sides of the triangle. If you don't then you
have to use the distance formula to find the lengths of the sides of the
triangle.
 You have to compute the semi-perimeter, so chances are you will have
fractions to work with.
 Lots of square roots are involved. For the lengths of the sides of the
triangle and for the area of the triangle.
 It's not the easiest thing in the world to work with.

Geometric Technique

The triangle can be enclosed in


a rectangle. The vertices of the triangle will intersect the rectangle in three
places, forming three right triangles. These triangles are denoted A, B, and C
in the picture.

The area of the triangle we desire will be the area of the rectangle minus the
areas of the three triangles.

The legs of the three triangles can be found by simple subtraction of


coordinates and then used to find the area since the area of a triangle is one-
half the base times the height.

Area of triangle A = 3 ( 3 ) / 2 = 9/2.


Area of triangle B = 5 ( 6 ) / 2 = 15.
Area of triangle C = 8 ( 3 ) / 2 = 12.
The sum of the areas of the triangles is 9/2 + 15 + 12 = 63 / 2 or 31.5.

The area of a rectangle is base times height, so the bounding rectangle has
area = 8 ( 6 ) = 48.

The area of the triangle in the middle is the difference between the rectangle
and the sum of the areas of the three outer triangles.

Area of triangle = 48 - 31.5 = 16.5.

Wow, that was much easier.

Determinants

It turns out that the area of a triangle can also be found using determinants.
The derivation of the formula is kind of long and most of you don't care to see
it, so it's on a separate page.

What you do is form a 3×3 determinant where the first column are the x's for
all the points, the second column are the y's for all the points, and the last
column is all ones.

x y 1

point -2 2 1
1

point 1 5 1
2

point 6 -1 1
3

Evaluate that determinant. I'll expand on column 1.

-2 2 1

1 5 1 = + (-2) 5 1 -1 2 1 +6 2 1

6 - 1 -1 1 -1 1 5 1
1

= -2 ( 5 + 1 ) - 1 ( 2 + 1 ) + 6 ( 2 - 5 ) = -2 ( 6 ) - 1 ( 3 ) + 6 ( -3 ) = -12 - 3 - 18 =
-33.

It is possible that you will get a negative determinant, like we did here. Don't
worry about that. The sign is determined by the order you put the points in and
can be easily changed just by switching two rows of the determinant. Area, on
the other hand, can't be negative, so if you get a negative, just drop the sign
and make it positive. Finally, divide it by 2 to find the area.

| -33 | = 33
33 / 2 = 16.5, which was the area.

Formula for the area of a triangle using determinants

x1 y1 1

Area = ± 1/2 x2 y2 1

x3 y3 1

The plus/minus in this case is meant to take whichever sign is needed so the
answer is positive (non-negative). Do not say the area is both positive and
negative.

Why not use absolute value, you ask? Well, think how confusing it would be to
have the absolute value of a determinant.

Test for Collinear Points

Continue with the idea of finding the area of a triangle. If the area of a triangle
was equal to zero, then there would be no triangle, the points would be
collinear (on a line).

We can use that fact to develop a test for collinear points.

If the area of a triangle is zero, the points are collinear.


We can drop the plus/minus and the one-half from the front of the
determinant, because the area will be zero only if the determinant is zero.

Three points are collinear if and only if the determinant found by placing the x-
coordinates in the first column, the y-coordinates in the second column, and
one's in the third column is equal to zero.

x1 y1 1

Does x2 y2 1 equal 0?

x3 y3 1

You are not setting the determinant equal to zero, you are testing to see if the
determinant is zero.

Equation of a Line

Three points are collinear if and only if that determinant is zero.

You can force three points to be collinear by setting the determinant equal to
zero.

Notice this time, that the actual variables x and y are in the determinant. That
is because you have two points on a line given, and the point (x,y) is a generic
point on the line.

When you expand this, I strongly recommend that you expand along the first
row. That way, your multiplications to find the determinants won't involve x or
y.

x y 1

x1 y1 1 = 0

x2 y2 1
Cramer's Rule

The derivation of Cramer's Rule can be found on another page. Here are the
results.

Solve the system of linear equations


3x + 5y = 12
2x - 4y = 9

Let D be the determinant of the coefficient matrix.

x y

3 5
D= = - 22
2 -4

Let Dx be the determinant of the coefficient matrix where the x column has
been replaced by the constants from the right hand side.

rhs y

12 5
Dx = = - 93
9 -4

Let Dy be the determinant of the coefficient matrix where the y column has
been replaced by the constants from the right hand side.

x rhs

3 12
Dy = =3
2 9

As long as D, the determinant of the coefficient matrix, is not 0, then x = D x / D


and y = Dy / D.
In this case, D = -22, so Cramer's Rule will work and
x = Dx / D = -93 / -22 = 93/22
y = Dy / D = 3 / -22 = - 3/22

Cramer's rule is named after Gabriel Cramer who lived from 1704 - 1752. He
is not the one who developed the technique originally, however, as the
Chinese were known to have used the method before him.

Extending Cramer's Rule to Larger Systems

Cramer's Rule can be extended to larger systems in the same manner. Simply
replace each column in the coefficient matrix by the right hand side, and then
divide that determinant by the determinant of the coefficient matrix.

For a 3×3 system, then let Dz be the determinant of the coefficient matrix
where the z column has been replaced by the constants from the right hand
side.

Benefits of Cramer's Rule

 Determinants can be found on a calculator for large systems


 If you need just one variable, you can find it with Cramer's Rule,
whereas with the other techniques you would have to find all of the
variables.

Problems with Cramer's Rule

 Takes a long time to re-enter each matrix into the calculator to find the
determinant. Best suited for a computer or calculator program.
 Requires a square system.
 Doesn't always work. If the determinant of the coefficient matrix is zero,
the technique fails and it is either no solution or many solutions.
 If D=0 and Dx=0 and Dy=0 then there are many solutions. You won't be
able to tell what the solutions are from Cramer's Rule, but there are
many solutions. This is the dependent case.
 If D=0, but at least one of the other determinants is not zero, then there
is no solution. This is the inconsistent case.

Cryptography

Cryptography involves encrypting data so that a third party can not intercept
and read the data.
In the early days of satellite television, the video signals weren't encrypted and
anyone with a satellite dish could watch whatever was being shown. Well, this
didn't work because all of the networks using satellites didn't want the satellite
dish owners to be able to receive their satellite feed for no cost while cable
subscribers had to pay for the channel, they were losing money. So, they
started encrypting the video signal with a system called Videocipher (later
replaced by Videocipher II).

What the Videocipher encryption system did was to convert the signal into
digital form, encrypt it, and send the data over the satellite. If the satellite dish
owner had a Videocipher box, and paid for the channel, then the box would
descramble (unencrypt) the signal and return it to its original, useful form.

This was done by using a key that was invertible. It was very important that
they key be invertible, or there would be no way to return the encrypted data
to its original form.

The same thing can be done using matrices.

Encryption Process

1. Convert the text of the message into a stream of numerical values.


2. Place the data into a matrix.
3. Multiply the data by the encoding matrix.
4. Convert the matrix into a stream of numerical values that contains the
encrypted message.

Example

Consider the message "Red Rum"

A message is converted into numeric form according to some scheme. The


easiest scheme is to let space=0, A=1, B=2, ..., Y=25, and Z=26. For
example, the message "Red Rum" would become 18, 5, 4, 0, 18, 21, 13.

This data was placed into matrix form. The size of the matrix depends on the
size of the encryption key. Let's say that our encryption matrix (encoding
matrix) is a 2x2 matrix. Since I have seven pieces of data, I would place that
into a 4x2 matrix and fill the last spot with a space to make the matrix
complete. Let's call the original, unencrypted data matrix A.

18 5
4 0
A=
18 21

13 0

There is an invertible matrix which is called the encryption matrix or the


encoding matrix. We'll call it matrix B. Since this matrix needs to be invertible,
it must be square.

This could really be anything, it's up to the person encrypting the matrix. I'll
use this matrix.

4 -2
B=
-1 3

The unencrypted data is then multiplied by our encoding matrix. The result of
this multiplication is the matrix containing the encrypted data. We'll call it
matrix X.

67 -
21

16 -8
X=AB
=
51 27

52 -
26

The message that you would pass on to the other person is the the stream of
numbers 67, -21, 16, -8, 51, 27, 52, -26.
Decryption Process

1. Place the encrypted stream of numbers that represents an encrypted


message into a matrix.
2. Multiply by the decoding matrix. The decoding matrix is the inverse of
the encoding matrix.
3. Convert the matrix into a stream of numbers.
4. Conver the numbers into the text of the original message.

Example

The message you need to decipher is in the encrypted data stream 67, -21,
16, -8, 51, 27, 52, -26.

The encryption matrix is not transmitted. It is known by the receiving party so


that they can decrypt the message. Other times, the inverse is known by the
receiving party. The encryption matrix can not be sent with the data, otherwise
anyone could grab the data and decode the information. Also, by not having
the decoding matrix, someone intercepting the message doesn't know what
size of matrix to use.

The receiving end gets the encrypted message and places it into matrix form.

6 -21
7

1 -8
6
X=
5 27
1

5 -26
2

The receiver must calculate the inverse of the encryption matrix. This would
be the decryption matrix or the decoding matrix.

B-1 = 0.3 0.2


0.1 0.4

The receiver then multiplies the encrypted data by the inverse of the
encryption matrix. The result is the original unencrypted matrix.

18 5

4 0
-1
A=XB =
18 21

13 0

The receiver then takes the matrix and breaks it apart into values 18, 5, 4, 0,
18, 21, 13, 0 and converts each of those into a character according to the
numbering scheme. 18=R, 5=E, 4=D, 0=space, 18=R, 21=U, 13=M, 0=space.

Trailing spaces will be discarded and the message is received as intended:


"RED RUM"

You might also like