Applications of Matrices
Applications of Matrices
Linear Systems
Example
Solve
2x1 + 3x2 = 9
x1 - 2x2 = 1
Solution
We have
x1 = 3
x2 = 1
Matrices
Example
A square matrix is an n by n matrix, that is a matrix such that the number of rows is equal to the
number of columns. The ijth entry is the number in the ith row and jth column. For example, the
the matrix above the 1 2thentry is
a12 = 4
aij = 0 for i j
Just as with vectors we can add and subtract matrices and multiply a matrix by a scalar. To add
or subtract matrices the dimensions of the two matrices must be the same.
Definition
Let A and B be m by n matrices and k be a scalar then
Example
Let
then
Two matrices are called equal if all of their entries are equal.
If A is an m by n matrix, then the transpose of A, AT, is the n by m matrix with the rows and
columns switched.
(AT)ij = Aji
Prove that
(AT)T = A
Solution
We have
Since the ijth entries are equal for each ij, the matrices are equal.
Matrix Multiplication
Let
Example
a = [2 1 0 6 -1] and b =
Solution
We have
Matrix Multiplication
There are many ways of thinking about a matrix. One way is as a collection of row vectors and
another way is as a collection of column vectors. Consider the m by p matrix A (considered as a
matrix of row vectors) and the p by n matrix B (considered as a matrix of column vectors). The
matrices are shown below.
Remark: It is not true in general that AB and BA are the same matrix even if they are both
defined.
Example
Let
Linear Systems
Ax = b
Where A is the coefficient matrix,
and b is the m by 1 matrix of numbers to the left of the equality. For example the
linear system
2x + 3y + z = 0
3x - 4y - z = 6
x + 2y + 3x = 2
can be written as
Properties of Addition
The basic properties of addition for real numbers also hold true for matrices.
1. A + B = B + A commutative
2. A + (B + C) = (A + B) + C associative
The proofs are all similar. We will prove the first property.
Proof of Property 1
We have
Notice that the zero matrix is different for different m and n. For example
Unlike matrix addition, the properties of multiplication of real numbers do not all
generalize to matrices. Matrices rarely commute even if AB and BA are both
defined. There often is no multiplicative inverse of a matrix, even if the matrix is a
square matrix. There are a few properties of multiplication of real numbers that
generalize to matrices. We state them now.
Let A, B and C be matrices of dimensions such that the following are defined. Then
2. A(B + C) = AB + AC distributive
3. (A + B)C = AC + BC distributive
4. There are unique matrices Im and In with
Im A = A In = A multiplicative identity
We will often omit the subscript and write I for the identity matrix. The identity matrix is a
square scalar matrix with 1's along the diagonal. For example
We will prove the second property and leave the rest for you.
Proof of Property 2
Again we show that the general element of the left hand side is the same as the right hand side.
We have
Example
so that
We have
so that
Since we can multiply a matrix by a scalar, we can investigate the properties that this
multiplication has. All of the properties of multiplication of real numbers generalize.
In particular, we have
1. r(sA) = (rs)A
2. (r + s)A = rA + sA
3. r(A + B) = rA + rB
Recall that the transpose of a matrix is the operation of switching rows and columns.
We state the following properties. We proved the first property in the last section.
1. (AT)T = A
2. (A + B)T = AT + BT
3. (AB)T = BTAT
4. (rA)T = rAT
When solving linear systems, we first transform the system into an augmented
matrix. At that point our goal is to transform the matrix into an "easier" matrix whose
corresponding linear system has the same solution set. We now defined what it means
for a matrix to be "easier".
Definition
4. The columns containing a leading one have zeros in all other entries.
If only 1, 2, and 3 are satisfied, then the matrix is in row echelon form.
Example
The main purpose of putting a matrix in rref is that this form makes the solution of the linear
system easy to identify. For example A corresponds to the system
x1 = 4 x2 = 2 x3 = x3
x1 = 4 x2 = 2 x3 = t
x1 + 3x3 = 5 x2 - x3 = 0 x3 = x3
x1 = 5 - 3t x2 = t x3 = t
3. Replace a row by the sum of that row and a multiple of another row.
Two matrices are called row equivalent if one can be transformed into the other using
a sequence of row operations. Since row operations do not effect the solution space,
any two row equivalent matrices have the same solution space.
Theorem
Instead of proving this theorem, we will explain how to take a matrix and transform it
into an rref matrix using only the elementary row operations. We follow the
following procedures:
1. Switch rows (if necessary) to ensure that the top left entry is nonzero. If the
first column is all zero go to the next one.
2. Make this top left entry a 1 by dividing the row by this entry.
3. Use this 1 and the third row operation to zero out the entries below and above
(there aren't any above for the first corner).
4. Repeat steps 1 through 3 for the columns to the right one at a time.
Example
Homogeneous Systems
Ax = 0
where A is the m x n matrix with entries aij, x the the n x 1 matrix with
entries xi and 0 is the n x 1 zero matrix. The augmented matrix's last column is the
zero column. Since the zero column is unaffected by elementary row operations, it is
usually left out when the computations are performed. The solution (0,0, ... , 0) is
called the trivial solution. Any other solution is called a nontrivial solution.
Theorem
Let
Ax = 0
be a homogeneous system with m x n matrix A. If m < n, then the system always has
a nontrivial solution.
This theorem just states that if there are more variables than equations, then there is a
nonzero solution.
Proof
Let B be the rref equivalent matrix to A. Then B has a column that does not contain a
corner. This gives us a parameter in the solution which we can set to 1, giving us a
nontrivial solution. Since B has the same solution set as A, A has this same nontrivial
solution.
Inverse of a Matrix
Definition and Examples
f(g(x)) = g(f(x)) = x
We will see later that matrices can be considered as functions from Rn to Rm and that
matrix multiplication is composition of these functions. With this knowledge, we
have the following:
Let A and B be n x n matrices then A and B are inverses of each other, then
AB = BA = In
Example
Not all square matrices have inverses. If a matrix has an inverse, we call
it nonsingular or invertible. Otherwise it is called singular. We will see in the next section how
to determine if a matrix is singular or nonsingular.
Properties of Inverses
(A-1) -1 = A
(AB) -1 = B-1A-1
-1
3. If A is nonsingular then
(AT) -1 = (A -1)T
AB = In
The first three properties' proof are elementary, while the fourth is too advanced for
this discussion. We will prove the second.
(AB)(B -1 A -1) = I
We have
= I definition of inverse
Now that we understand what an inverse is, we would like to find a way to calculate
and inverse of a nonsingular matrix. We use the definitions of the inverse and matrix
multiplication. Let A be a nonsingular matrix and Bbe its inverse. Then
AB = I
Recall that we find the jth column of the product by multiplying A by the jth column
of B. Now for some notation. Let ej be the m x 1 matrix that is the jth column of the
identity matrix and xj be the jth column of B. Then
Axj = ej
[A|ej]
Instead of solving these augmented problems one at a time using row operations, we
can solve them simultaneously. We solve
[A | I]
Example
Find the inverse of the matrix
Solution
The inverse matrix is just the right hand side of the final augmented matrix
This example demonstrates that if A is row equivalent to the identity matrix then A is
nonsingular.
We can use the inverse of a matrix to solve linear systems. Suppose that
Ax = b
Then just as we divide by a coefficient to isolate x, we can apply A-1 to both sides to
isolate the x.
A-1Ax = A-1b
Ix = A-1b x = A-1b
Example
Solve
x + 4z = 2
x + y + 6z = 3
-3x - 10z = 4
Solution
Ax = b
with
The solution is
x = A-1 b
The solution is
x = -18 y = -9 z = 5
Notice that if b is the zero vector, then
Ax = 0
can be solved by
x = A-10 = 0
1. A is nonsingular
3. A is row equivalent to I
11.
12. We have the following table:
13.
Message Transmission
(0,0) (0,0,0)
(1,0) (1,0,1)
(0,1) (0,1,0)
(1,1) (1,1,0)
14.If an entry in the transmission differs from what the entry was supposed to be
transmitted, then we call this an error. Notice that if the receiver receives a
transmission other than the four possible transmissions, then an error is
detected. For example a transmission of (1,1,1) is detected as an error. The
receiver will detect an error whenever there is exactly one error in the
transmission. However if there are two errors, the error will not be detected.
This is called a single error correcting code. Notice that the third component
of the transmission is 0 if the sum of the entries of the message is even and 1 if
the sum is odd. The sum of the entries is called theweight of the message. The
transmission in the example is called a parity check code and will detect an odd
number of errors, but will not detect an even number of errors.
15.Example
16.Consider the matrix
17.
18. This matrix takes three letter words and produces a 5 letter word. The table for this is
19.
Message Transmission
(0,0) (0,0,0,0,0,0)
(1,0) (1,0,1,0,1,0)
(0,1) (0,1,0,1,0,1)
(1,1) (1,1,1,1,1,1)
20. Notice that this transmission just repeats the message three times. It will detect one or
two errors, hence is called a double-error detecting code. If we assume that there will
never be more than one error, then we can correct an error. For example, if the received
transmission is (1,1,0,1,0,1), then the only possible correct transmission that gives one
error is (1,0,1,0,1,0), hence the original message was (1,0).
21.
22.
Graph Theory
We now delve into our first application or matrices, graph theory, which shows its
face in communications, sociology, business, transportation sciences, and many other
fields. We begin by stating the basic definitions.
A directed graph, also called a digraph, is a set of points P1, P2, ... ,
Pn called vertices and ordered pairs of points PiPj called edges.
A digraph can have a vertex that does not belong to any edge or two points that are
connected by edges in both directions.
Example
The digraph with points P, Q, R, S, and edges PQ, QP, PR, and QR is shown below.
Let G by a digraph with n vertices, then the adjacency matrix of A, written A(G), is
the n x n matrix with A(G)ij equal to 1 if PiPj is an edge and zero otherwise.
Example
Example
Five students, Aurellio, Brian, Cindy, Dave, and Edward have formed a study group. Aurellio
has Cindy and Dave's phone number, Brian has Edward's number, Cindy has Dave and Edward's
number, Dave has Aurellio and Brian's number and Edward has everyone's number.
Access
One of the questions that we may ask, is if Aurellio wants to get a hold of Brian, how can he do
this? More specifically we can ask how many ways are there of Aurillio getting Brian's number
using no more than two edges.
We say that Pi has r stage access to Pj if there is a way to get to Pj from Pi via r edges.
Let A(G) be the adjacency matrix of a digraph G then the number of r stage accesses
that Pi has to Pj is given by
[A(G)r]ij
Thus the total number of ways that Pi has access to Pj in r or fewer stages is
the ijth element of the matrix
To find out how many ways there are of Aurillio getting Brian's number using no more than
two edges we just take the 1 2th element of this matrix. This is 1, so there is exactly one way of
Aurillio getting Brian's number using no more than two edges.
Cliques
Sociologists speak of cliques, which mean subgroups of a larger group that associate
with each other but do not associate with others. In the language of graph theory we
have the following.
Definition
Example
In the above example, it is relatively easy to spot any cliques. For larger digraphs, it
is much more difficult to spot a clique just by looking. Fortunately, there is a way of
doing this using matrices.
Theorem
Let A(G) be the adjacency matrix of a digraph and let S by the matrix whose entries
are defined by
Example
We see that the positive diagonal elements correspond to P1, P2, P3, and P6. So these four vertices
are in a clique.
If G is a graph then we are often concerned with ensuring that there is a path from any
vertex to any other vertex. If the vertices represent street corners and the edges
represent roads, then a civil engineer wants to ensure that a car can get from any street
corner to any other corner. This idea also applies to networked systems such as
telephone lines.
A graph is called strongly connected if for every two distinct vertices Pi and Pj there is
a path leading from Pi to Pj and from Pj to Pi. Otherwise they are not strongly
connected.
If there is a path that leads from Pi to Pj then at some stage Pi has access to Pj so
that A(G)r will be positive. Moreover, since there are n vertices, the shortest path will
contain fewer than n edges. This leads us to the following theorem.
Theorem
Let G be a digraph and A(G) be its adjacency matrix, then G is strongly connected if
and only if
Example
Electrical Circuits
This discussion will focus on using matrices to answer questions related to electrical
circuits. We will provide the basic ideas from physics and see how matrices are
useful in this subject. An electrical circuit consists of several components some of
which are
Batteries
Resisters
Wires
A battery provides current (in volts) to the circuit, a resister converts electrical energy
into other useful energy such as light reducing the current, and a wire allows the
current to flow through it without increasing or reducing the current. The example
below shows an electrical circuit diagram.
In this circuit diagram there are three batteries and four resisters. As you will notice
the diagram contains plenty of additional notes. The batteries' electrical potential
difference is measured in volts. The battery to the left is a 60 volt battery, the middle
battery is an 80 volt battery, and the voltage of the battery to the right has yet to be
determined. The resisters are measured in ohms. We use the Greek letter as the
unit indicator. The currents I1 and I2 are measured in amperes. In the diagram above
the both currents have yet to be determined.
You will also notice the letters a, b, c, d, e, and f labeled on the circuit diagram.
These mark important points in the diagram. Points b and e represent nodes.
A node is a point where three or more wires connect. Pointsa, c, d, and f are not
nodes, however as we shall see next, it is convenient to label them.
A voltage loop is a closed connection within a circuit. That is a piece of the circuit
beginning at a point and ending at the same point. We will be interested in loops that
do not contain any sub loops. There are two such loops in the above diagram:
and
A change in voltage occurs when a current passes through a battery. For example, on
the 60 volt battery, a current flowing upwards (from "-" to "+") will gain 60 volts
while a current flowing downwards (from "+" to "-") will lose 60 volts.
V = IR
The sign is positive if the measurement is taken against the current flow and the sign
is negative of the measurement is taken in the direction of the current flow.
Kirchhoff came up with two law for electrical circuits that will help us find the
unknown quantities.
Kirchhoff's Voltage Law: Around any voltage loop, the total electrical potential
difference is zero.
Kirchhoff's Current Law: At any current node, the flow of all currents into the node
equals the flow of all currents out of the node.
The first law is often called conservation of energy and the second law is often called
conservation of charge.
We now have all the ingredients necessary to solve our problem. We will use
Kirchhoff's two laws and the help of matrices to find the unknown currents and
voltage. First we give a direction to the two currents. Later we may change the
directions. Let I1 flow from e to f to a to b and let I2 flow from b to c to d to e. We
begin with the loops. Consider the loop
From a to b, the current I1 passes through a resistor of 3 amps hence the potential
difference is
-3I1
From b to e, the current passes though a battery with an 80 V voltage drop will have a
potential difference of
-80
From e to f the current passes through a resistor of 1 amp hence the potential
difference is
-I1
From f to a, the current passes though a battery with an 60 V voltage gain will have a
potential difference of
60
-3I1 - 80 - I1 + 60 = 0
or
-4I1 = 20
-2I2 - E - 3I2 + 80 = 0
or
5I2 + E = 80
Now we use Kirchhoff's current law. For the node b, the sum of the currents going in
are
I1 + 13
I2
So that
I1 + 13 = I2
or
I1 - I2 = -13
I2 = I1 + 13
Notice that this gives us no new information. We have the three equations
-4I1 = 20
5I2 + E = 80
I1 - I2 = -13
We have that
I1 = -5 I2 = 8 E = 40
Wavelets
Introduction
Modern computers are constantly sending images and videos that need to be compressed in order
to be put into a smaller package for high speed transmission. When the receiver receives the
package, the image must be decompressed. Ideally, we would want a system that compresses
and decompresses without losing any data. This is usually impossible. Instead, computers strive
to accomplish compression and decompression with a minimal loss of data.
For example, if the data is a picture, we want the transformed picture to look about the same as
the original. Digital pictures are just a sequence of numbers so we are interested in taking a large
sequence of numbers, compressing the large sequence into a smaller sequence of numbers and
then decompressing into a new large sequence of numbers that is approximately the same as the
original list. The new sequence that approximates the original sequence is called a wavelet.
Averaging
Giving two numbers, if we want to compress the numbers into one number, the most
logical number to send is the average of the two numbers. We can think of this
process as starting with the vector
v = [a,b]T
w = Av
[0.5,0.5]
This transformation has the advantage of sending information that is half the size that
contains information from both numbers. Of course we can never get back to the
original two numbers from just the average.
v = [a,b,c,d]T
we take the average of a and b and the average of c and d. If we think of this as
compressing an image, we are merging adjacent pixels together. The matrix A that
takes pairwise averages is given by
Average-Difference Representation
For most pictures, there are areas where the color does not change much at all. When
this is the case, we compute the average and the distance from the average. If the
distance from the average is close to zero, we round to zero and omit the distance.
For most pictures, this allows us to compress a picture to a file that is much smaller in
size than sending information about every pixel.
For a sequence of two numbers, v = [a,b], we take the average and the distance from
the first entry to the average. The matrix that corresponds to this transformation is
For example if
v = [3,7]
then
AvT = [5,-2]T
Notice that 5 is the average of 3 and 7 and -2 is the first (3) minus the average (5). Also notice
that A has the inverse
This allows us to get the original data back from the the transformed data. Notice that
For a sequence of four numbers [a,b,c,d], we use a two step process to make a
transformation. For the first step, the first outcome is the average of a and b, the
second is the average of c and d, the third is the distance from a to the average
of a and b, and the fourth is the distance from c to the average of c and d. The matrix
for this transformation is
The second step is to transform these intermediate numbers so that the first number is the
average of the first two (the final average), the second is the distance from the intermediate first
number to the total average, and the last two numbers remain the same. The matrix that
accomplishes this is
Composing these two transformation is the same as multiplying these matrices. If we start with
a 4 x 1 vector v, then we obtain the new vector using
u = A 1 A2 v
Example
A1vT = [4,6,-2,3]T
and
Threshold Values
Then the 8 x 8 matrix that computes pairwise averages and then distances is given by
We let the second matrix be the matrix that computes the averages of the first four and last four
respectively and then distances from the first average to the combined averages of the first two
averages and from the third average to the final two averages. Finally it leaves the final four
entries the same. The matrix that accomplishes this is
The third step is to let the first entry be the final average and the second entry be the distance
between the average of the first four and the final average. The matrix should leave the final six
entries the same. This matrix is
wT = A3A2A1vT
Before we send the information wT we compress the data. The first entry is the final average and
we do not touch this number. The last seven numbers are the detail coefficients. One way of
compressing the data is to consider all small detail coefficient zero. Think of this as saying that
if nearby data points are close to their averages, then replace the data with the average.
The threshold number is the value such that if a detail coefficient is below this value (in
absolute value) then it is replaced by zero.
To get back to close to the original vector we take the inverse. We use the fact that
(A3A2A1) -1 = A1-1A2-1A3-1
Thus
vT A1-1A2-1A3-1wT
Example
Use the threshold number 5 to compress the data. Then decompress the data.
Solution
We find that
Next replace the values that are below 5 with a zero to get the compressed data
Notice that this contains only 5 nonzero numbers, which is smaller than the original 8. Now
decompress to get
Although the numbers are not exactly the same as the original, they are close.
Determinants
Permutations
Before we can get to the definition of the determinant of a matrix, we first need to
understand permutations.
Let
S = {1,2,...,n}
Example
The identity permutation is the permutation that keeps the elements in numerical
order.
For example
e3 = (1,2,3)
We define a transposition of two elements the permutation that switches the elements.
For example (2,1,3) is a transposition that switches 1 and 2. We can compose two
permutations since they are functions. Given a permutation, how many transpositions
does it take in order to get to the identity permutation? It turns out that this is not a
well defined question, since there are many ways of getting back to the identity.
However given any permutation, the parity of the number of transpositions to get back
to the identity is independent of how it is done.
Example
(3,4,2,1) is an odd permutation since we can get back to the identity via
We are now ready to define the determinant of the matrix. The definition will be
quite difficult to understand as it is written. We strongly encourage you to read
through the examples and try some of your own.
Definition
where the sum is taken over all possible permutations on n elements and the sign is
positive if the permutation is even and negative if the permutation is odd.
Example
Solution
We use all the permutations on 3 elements. The permutation (1,2,3) is even and corresponds
with the product
a11a22a33 = (2)(3)(0) = 0
-a11a23a32 = -(2)(5)(-1) = 10
Notice that the i subscripts are 1, 2, and 3 and the j subscripts are 1, 3, 2.
a12a23a31 = (0)(5)(10) = 0
a13a21a32 = (4)(1)(-1) = -4
0 + 10 + 0 + 0 - 4 - 120 = -114
Example
Solution
There are 24 permutations, however we only need those corresponding to products that are
nonzero. Since the last row has only one nonzero entry (third column), the last number in the
permutation must be a 3. Also the first column has only one nonzero entry, hence the one must
be in the second entry. For the first number in the permutation, we can only have a 4, since the
first and second entries are zeros and 3 is already taken up by the fourth number. That leaves
only 2 for the third number since 1 and 3 correspond with zero entries and 3 is reserved for the
fourth number. Hence the only permutation that leaves us with a nonzero product is
(4,1,2,3)
This permutation is odd and corresponds with the product
-(3)(1)(5)(-2) = 30
Since all other permutations lead to a zero product, the determinant is 30.
The payoff of this definition of the determinant is that we can quickly prove many
properties of the determinant. The list is long and we will prove only a few of them.
Theorem
det A = 0
Proof
Each term of det A includes one factor that contains each row, hence each term has a
zero factor. The sum of zeros is zero.
Theorem
det A = 0
Proof
We will prove this for the first two rows. The general case is similar. The parity
of (s1,s2,...,sn) is the opposite of the parity of (s2,s1,...,sn). Hence each term is repeated
twice once with a positive coefficient and once with a negative coefficient. The terms
cancel each other out and add up to zero.
The next three theorems explore what happens to the determinant after row operations
have occurred.
Theorem
Let A be a square matrix and B be the matrix after a row of A has been multiplied by
a constant. Then
det A = c det B
Proof
Assume that the first row row has been multiplied by c. The general case is similar.
The terms in each are identical except that the first factor for A is a1j1 and the first
factor for B is ca1j1. Since each term for the Bdeterminant has an extra factor of c,
the c can be factored out.
Theorem
Let A be a square matrix and B be the matrix after two rows of A have been
switched. Then
det A = - det B
Proof
This theorem comes directly from the definition, since switching two elements of a
permutation changes the parity of the permutation. Hence switching two rows
changes the sign of each term.
Theorem
Let A be a square matrix and B be the matrix after a row of A have been replaced by
that row plus a multiple of another row. Then
det A = det B
Let A be a triangular matrix then det A is equal to the product of the diagonal entries.
Proof
The terms of the determinant of A will only be nonzero when each of the factors are
nonzero. If A is lower triangular, then the only nonzero element in the first row is
also in the first column. For the second row, we have already used the first column,
hence the only nonzero element is the second column. Continuing this way we obtain
the product of the diagonals. This permutation is the identity (1,2,...,n) which is even.
Theorem
det A = det AT
Theorem
Theorem
If A is nonsingular, then
1
-1
det (A ) =
det A
Proof
We have
AA-1 = I
hence
det(AA-1) = det I
But
Cofactors
Cofactors and Determinants
Definition
Example
Let
then
so the minor of a32 is the determinant of this 2 x 2 matrix. Since the matrix is triangular, the
determinant is the product of the diagonals or
(2)(4) = 8
The cofactor is
A23 = (-1)2+3(8) = -8
One of the main applications of cofactors is finding the determinant. The following theorem,
which we will not prove, shows us how to use cofactors to find a determinant.
Theorem
Example
Solution
We can use any row that we want. Let's pick the second row. We have
= 0 + (3)(0 - 5) + (8 - 0) = -7
Remark: Since det A = det AT, we can expand about a column if we desire.
Example
Solution
We can choose any row or column to expand. The third column has only one nonzero entry, so
we select this column. We have
Theorem
Proof
We will prove the first statement for i = 1 and k = 2. The general case and the second
statement can be proven in a similar way. We want to show that
Consider the matrix B that is the same as A except that the second row of B is the
same as the first row. Since two rows of B are repeated, the determinant of B is zero.
Now find det B by expanding about the second row. You will notice that this
expansion is
Definition
Let A be an n x n matrix. Then the adjoint of A (adj A) is the matrix such that
Example
Solution
We have
So that
Theorem
If A is an n x n matrix then
A(adj A) = (adj A)A = (det A) In
Proof
The proof follows immediately from the formula for the determinant and the previous
theorem. We have
where dij is the Kronecker delta function evaluating to 1 for i = j and 0 otherwise. Hence the
theorem is proven.
The main application of this theorem is the following corollary that easily follows from the
theorem.
Corollary
1
-1
A = adj A
det A
Example
has adjoint
We can find that
Hence
This gives us a way to find inverses and a way to determine if a matrix is nonsingular.
Theorem
Proof
If A is nonsingular, then
If the determinant is nonzero, then the corollary shows us how to find the inverse so the matrix is
nonsingular.
This gives us an addition to our list of nonsingular equivalences.
Theorem
TFAE
1. A is nonsingular.
2. Ax = 0 has only the trivial solution.
3. A is row equivalent to the identity.
4. Ax = b has a unique solution for all b.
5. The determinant of A is nonzero.
We end this discussion with the statement of Cramer's Rule, a formula that gives us
the solution of systems of equations.
Cramer's Rule
Let
Ax = b
det(Ai)
xi =
det(A)
Example
Solution
We have
We find z by dividing
20
z = = 4
5
Code Theory
Code theory has become increasingly important as computers have become ingrained
in our lives. This discussion will focus on error detection and correction rather than
on encryption. When a message is sent over the net, it is encoded as a binary string of
numbers. It is likely that a few of these numbers will become corrupted (a 1
becoming a 0 or a 0 becoming a 1). We will be looking at ways of detecting such an
error and if possible correcting it. First a few definitions.
Example
Message Transmission
(0,0) (0,0,0)
(1,0) (1,0,1)
(0,1) (0,1,0)
(1,1) (1,1,0)
If an entry in the transmission differs from what the entry was supposed to be
transmitted, then we call this an error. Notice that if the receiver receives a
transmission other than the four possible transmissions, then an error is detected. For
example a transmission of (1,1,1) is detected as an error. The receiver will detect an
error whenever there is exactly one error in the transmission. However if there are
two errors, the error will not be detected. This is called a single error correcting
code. Notice that the third component of the transmission is 0 if the sum of the entries
of the message is even and 1 if the sum is odd. The sum of the entries is called
theweight of the message. The transmission in the example is called a parity check
code and will detect an odd number of errors, but will not detect an even number of
errors.
Example
Consider the matrix
This matrix takes three letter words and produces a 5 letter word. The table for this is
Message Transmission
(0,0) (0,0,0,0,0,0)
(1,0) (1,0,1,0,1,0)
(0,1) (0,1,0,1,0,1)
(1,1) (1,1,1,1,1,1)
Notice that this transmission just repeats the message three times. It will detect one or two
errors, hence is called a double-error detecting code. If we assume that there will never be more
than one error, then we can correct an error. For example, if the received transmission
is (1,1,0,1,0,1), then the only possible correct transmission that gives one error is (1,0,1,0,1,0),
hence the original message was (1,0).