Chapter 6 - Matrices and Determinants
Chapter 6 - Matrices and Determinants
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.
When working with systems of linear equations, there were three operations
you could perform which would not change the solution set.
Row-Echelon Form
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.
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
Pivoting
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
Addition
Subtraction
Scalar Multiplication
Zero Matrix
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.
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.
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
1 0
I2 =
0 1
1 0 0
I3 = 0 1 0
0 0 1
Properties of Matrices
Property Example
Distributive c (A + B) = cA + cB
Distributive (c + d) A = cA + dA
Left Distributive A (B + C) = AB + AC
Right Distributive ( A + B ) C = AC + BC
Multiplicative Identity IA = AI = A
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.
Just because a product of two matrices is the zero matrix does not
mean that one of them was the zero matrix.
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.
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
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
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.
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.
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.
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.
A matrix does not have to have an inverse, but if it does, the inverse is unique.
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.
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.
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.
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.
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?
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.
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?"
3 2 -5
1 -3 2
5 -1 4
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
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 = ...
There you go, x = 191/88, y = 519/88, and z = 111/88. That would be a real
pain to solve by hand.
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.
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 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
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.
C1 C3
R1 1 2
= 1(3) - 4(2) = 3 - 8 = -5
R2 4 3
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.
C1 C2 C3
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
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.
C1 C2
R1 + -
R2 - +
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.
C1 C2 C3
R1 -13 -2 18
R2 4 -2 1
R3 7 5 -11
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.
1 3 2
4 1 3
2 5 2
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
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
However, you can't do diagonals. If we try the main diagonal, you get
1 32
4 13
2 52
-13 2 18
-4 -2 -1
7 -5 -11
-13 -2 18
4 -2 1
7 5 -11
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.
-2/17 - 5/17
2/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.
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.
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
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.
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
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.
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.
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.
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.
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.
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
s = 1/2 ( a + b + c )
Area = sqrt ( s ( s-a) ( s-b) ( s-c) )
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).
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 area of the triangle we desire will be the area of the rectangle minus the
areas of the three triangles.
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.
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
-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.
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.
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).
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
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.
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
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.
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.
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.
Encryption Process
Example
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
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
Example
The message you need to decipher is in the encrypted data stream 67, -21,
16, -8, 51, 27, 52, -26.
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.
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.