Download 4. SYSTEMS OF LINEAR EQUATIONS §4.1. Linear Equations

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Matrix (mathematics) wikipedia , lookup

Singular-value decomposition wikipedia , lookup

Perron–Frobenius theorem wikipedia , lookup

Non-negative matrix factorization wikipedia , lookup

Orthogonal matrix wikipedia , lookup

Linear least squares (mathematics) wikipedia , lookup

Four-vector wikipedia , lookup

Eigenvalues and eigenvectors wikipedia , lookup

Matrix calculus wikipedia , lookup

Cayley–Hamilton theorem wikipedia , lookup

Matrix multiplication wikipedia , lookup

Gaussian elimination wikipedia , lookup

System of linear equations wikipedia , lookup

Transcript
4. SYSTEMS OF LINEAR
EQUATIONS
§4.1. Linear Equations
A linear equation is an equation of the form a1x1 + a2x2 + ... + anxn = d where the ai’s and d,
are constants. The ai’s are called coefficients, and the xi’s are variables. If there are just three
variables we generally use the symbols x, y, z as the variables and write the equation as ax + by +
cz = d. If there are only two variables we write it as ax + by = c. A linear equation ax + by = c
represents an equation in the plane (so long as either a or b is non=zero). A linear equation ax + by
+ cz = d represents a plane in 3-dimensional space (again, provided at least one of the coefficients is
non-zero).
A system of linear equations is a set of two or more linear
equations. Solving such a system means finding all of the
combinations of the variables for which all of the equations hold. If
we have a system of two equations in two variables we generally get a
unique solution. This is because the two equations represent two
straight lines in the plane, and generally two such lines intersect in a
single point. Of course, it is possible for the lines to be parallel, in
which case there are no solutions.
It is very easy to solve two linear equations in two variables. We simply multiply the
equations by suitable constants and then add or subtract to eliminate one variable. We then
substitute this into either of the equations to find the value of the other variable.
Example 1: Solve the system
A
 3x −7y = 1

2x + 4y = 18
.
A
E
Solution: Multiply the first equation by 2 and the second equation by 3 to get
A
 6x −14y = 2

6x + 12y = 54
Now subtract the first equation from the second. This gives 26y = 52. Hence y = 2.
Substituting into the original first equation we get 3x − 14 = 1. Hence 3x = 15 and so x = 5.
Thus x = 5, y = 2 is the unique solution. If we had instead substituted into the original second
equation we would have got 2x + 8 = 18, 2x = 10 and so x = 5. Geometrically, the two lines
intersect in the point (5, 2).
Solving three
equations in three variables
can be viewed
geometrically as finding
points of intersections of 3
planes. The typical case is
where there is just one
point of intersection, but
there are cases where there
are infinitely many
solutions, such as when the
planes intersect in a line,
and there are cases where
there are no solutions.
53
.
A
E
One can use the same ad hoc method of eliminating variables to solve such a system. The
problem is, that frequently students eliminate one variable and, while attempting to eliminate a
second variable, the first variable creeps back in. What is needed is a lot of discipline and an
systematic procedure.
As well, in solving such a system we could find ourselves writing down lots of x’s and y’s
and z’s. This is unnecessary as all the arithmetic involves just the coefficients and the constants on
the right hand sides of the equations. So we strip off the variable names and work with just the
table of coefficients and the table of constants.
Often we arrange data in a table of rows and columns. Such a table can be considered as a
single mathematical object, called a matrix (plural “matrices”). An m × n matrix is a rectangular
array of numbers arranged in m rows and n columns. The numbers can come from any field,
such as the field of real numbers or the field of complex numbers. The entries in the table are called
the components of the matrix. If there’s just one column we call the matrix a column vector.
So if we have the system of linear equations:
ax + by + cz = d
 ex + fy + gz = h
 px + qy + rz = s
A
E
d
a b c 
h


e
f
g
we could write this a matrix and a column vector: 
 and   .
s
p q r 
E
A
A
A
E
A
Note that we use large parentheses rather than draw up a grid of squares. Actually we put
the matrix of coefficients and the column vector of constants into a single matrix called the
augmented matrix. The coefficient matrix is augmented by the constant vector. In this case we
write the above system of 3 equations in 3 variables as:
a b c d
 e f g h


p q r s 
A
E
A
Note that we separate the coefficient part from the constants by a vertical line. This is not
necessary but it makes it easier to read. Think of the vertical line as a column of equal signs. In
fact the augmented matrix is a sort of dehydrated version of the system of equations – just add
variables. With a little practice you should be able to read an augmented matrix as a system of
equations – provided you know the variable names.
Of course it’s important that the equations are arranged so that the variables come in the
same order, so that each column in the coefficient part refers to the same variable. And if a variable
is missing from an equation it should be given a coefficient of zero.
 3x −4y + z = 11
3x −4y + z = 11
Example 2: The system  x − 5z = 12 should be first rewritten as x + 0y − 5z = 12 .
 2z = y + 4
0x + y − 2z = −4
 3 − 4 1 11 


It can then be written as the augmented matrix  1 0 − 5 12  . (With a bit of practice you can
0 1 − 2 − 4


write down the augmented matrix straight away.)
A
A
E
A
54
A
E
When solving such a system there are certain operations we are permitted to use. These
produce a different, but equivalent, set of equations – equivalent in the sense that they have the
same solutions. We can rearrange the equations, we can multiply an equation by a non-zero
constant and we can add or subtract one equation from another. The aim is to put the augmented
matrix into what is known as echelon form.
§4.2. Echelon Form
A matrix is said to be in echelon form if:
(1) any zero rows are at the bottom;
(2) the first non-zero entry in the other rows is “1”;
(3) these 1’s are staggered so that later rows have their “1” in later columns.
The importance of having an augmented matrix in echelon form is that it is very easy to
solve the system by a method known as back substitution. This method is illustrated below.
Example 4: The following are some augmented matrices in echelon form:
12345
0 1 2



1 2 3 4
000
00167
0 0 1
0 1 5 6 ,
,
0 0 0 1 8 0 0 0 , 0 0 0 .


0 0 1 7
0 0 0 0 0 0 0 0
The advantage of having an echelon form is that it’s easy to solve the equations by “back
substitution”. In the first case, if the variables are x, y, z the last equation is z = 7. Substituting in
the second last equation, y + 5z = 6, we get y = −29.
Finally substituting into the first equation x + 2y + 3z = 4 we get x = 41.
A
E
A
A
E
A
A
E
A
A
E
A
If the variables in the second system are x1, x2, x3, x4 the last equation is 0 = 0. This is
redundant. The second last equation is x4 = 8. The second equation is x3 + 6x4 = 7 which gives
x3 = −41. The first equation is x1 + 2x2 + 3x3 + 4x4 = 5, which simplifies to x1 + 2x2 = 96.
Now x2 can be chosen arbitrarily. If we let x2 = k then x1 = 96 − 2k. So the complete
solution is:
x1 = 96 − 2k, x2 = k, x3 = −41, x4 = 8.
In this case we have infinitely many solutions. Of course there is no logical reason for using k
instead of x2. It’s just that it looks nicer.
For the third augmented matrix the second equation is 0 = 1. This is clearly impossible.
This system has no solution. We say that the system of equations is inconsistent.
The last system is rather trivial. There are two variable, say x and y, and essentially no
equations. So we can choose any values for them.
Once a system of equations is in echelon form it’s very easy to see if the system is consistent
or inconsistent, and if it is consistent it’s easy to see if there is a unique solution or infinitely many.
Also, the solution, or solutions can be found readily using “back substitution”.
When a system of equations is solved by a computer program the coefficients and constants
are stored in an array. There needs to be some systematic algorithm, or procedure. The three types
of operation carried out by such a program are:
• Dividing a row of the augmented matrix by a non-zero constant;
• Subtracting a certain multiple of one row from another;
• Swapping two rows.
If the matrix represents a system of equations these are permitted operations that do not change the
solution. The algorithm that is used is known as the Gaussian Algorithm.
55
§4.3. The Gaussian Algorithm
Suppose A = (aij) is an m × n matrix, such as an augmented matrix.
(1) Let r = 1 and c = 1.
(2) If arc ≠ 0 go to step (5).
(2) If arc = 0 but aic ≠ 0 for some i with r < i ≤ m swap row r with row i and go to (2).
(3) If aic = 0 for all i with r ≤ i ≤ m let c = c + 1. If c ≤ n go to step (2).
(4) END
(5) Divide row r by arc.
(6) For t = r+1 to m, subtract atc times row r from row t.
(7) Increment both r and c by 1 and go to step (2).
Note that step (5) makes arc = 1 and step (6) puts zeros underneath.
3 2 1 12
Example 5: Put the matrix 4 −1 2 12 in echelon form.
1 1 1 8 
3 2 1 12
1 2/3 1/3 4 


Solution 1: 4 −1 2 12 → 4 −1 2 12 R1 ÷ 3
1 1 1 8 
1 1 1 8 
1 2/3 1/3 4 
→ 0 −11/3 2/3 −4 R2 − 4R1, R3 − R1
 0 1/3 2/3 4 
4 
1 2/3 1/3

→ 0 1 −2/11 12/11 R2 ÷ (−11/3)
 0 1/3 2/3
4 
4 
1 2/3 1/3

 R − (1/3)R
0
1
−2/11
12/11
→
2
 3
 0 0 8/11 40/11
4 
1 2/3 1/3

→ 0 1 −2/11 12/11 R3 ÷ (8/11)
0 0
1
5 
E
A
A
E
A
A
E
A
A
E
A
A
A
A
E
A
E
A
E
A
A
If this matrix is the augmented matrix of a system of equations then z = 5. From the second
equation y = 2. From the first equation x = 1.
Solution 2: When performing the algorithm by a computer the messy arithmetic is no problem.
However when performing the calculation by hand it often pays to vary the algorithm in order to
simplify the arithmetic. Any sequence of elementary row operations will do provided we end up
with the echelon form. This is what we’ve done here.
3 2 1 12 1 1 1 8 
4 −1 2 12 → 4 −1 2 12  R ↔R
1
3

 

1 1 1 8  3 2 1 12
1 1 1 8 
→ 0 −5 −2 −20  R2 − 4R1, R3 − 3R1
0 −1 −2 −12
1 1 1 8 
→ 0 1 2 12 R2↔ R3, R2÷(−1),R3÷(−1)
0 5 2 20 
1 1 1 8 
→ 0 1 2 12  R3−5R2
0 0 −8 −40
A
E
A
A
E
E
E
A
A
A
A
A
A
E
A
56
1 1 1 8 
→ 0 1 2 12
0 0 1 5 
A
E
A
R3÷(−8)
Notice that we’ve obtained a different, and simpler, echelon form. Different sequences of
elementary row operations will generally yield different echelon forms. But if the matrix is the
augmented matrix of a system of linear equations the solutions will be the same. Here we would
have z = 5 from the third equation, y = 12 −2 × 5 = 2 from the 2nd and x = 8 − 2 − 5 = 1 from the 1st
equation.
When systems of linear equations are solved on a computer the strict Gaussian algorithm, or
a variation of it, is used. After all the components will generally not be integers so there’s no
problem in dividing to get the 1’s in the echelon form. But in examples that are designed to be done
by hand the components are usually integers and there’s some merit in varying the algorithm as we
have done.
 3x + 2y − 5z = 3
Example 6: Find the solution(s) to the system: 4x − 5y + 7z = −7 .
11x − 2y + 3z = 7
 3 2 −5 | 3 
 3 2 −5 | 3 
Solution:  4 −5 7 | −7 →  1 −7 12 | −10 R2 − R1
11 −2 3 | 7 
11 −2 3 | 7 
We did this because we could see that we would get a “1”.
 1 −7 12 | −10
→  3 2 −5 | 3  R1 ↔ R2
 11 −2 3 | 7 
 1 −7 12 | −10
→  0 23 −41 | 33  R2 − 3R1, R3 − 11R1
 0 75 −129 | 117
Now we seem to be in trouble. How do we get a “1”, without dividing row 2 by 23, which would
be very messy? If we subtract 3 times row 2 from row 3 we get a smaller integer on the diagonal.
 1 −7 12 | −10
→  0 23 −41 | 33  R3 − 3R2
 0 6 −6 | 18 
Now normally we might now subtract 3 times row 3 from row 2, getting 5 on the diagonal. Or
better still we could subtract 4 times row 3 from row 2, getting −1 on the diagonal. But in this case
we notice that we can divide row 3 by 6, getting a “1” on the diagonal and no fractions.
 1 −7 12 | −10
→  0 23 −41 | 33  R3 ÷ 6
 0 1 −1 | 3 
 1 −7 12 | −10
→  0 1 −1 | 3  R2 ↔ R3
 0 23 −41 | 33 
 1 −7 12 | −10
→  0 1 −1 | 3  R3 − 23R2
 0 0 −18 | −36
 1 −7 12 | −10
→  0 1 −1 | 3  R3 ÷ (−18).
0 0 1 | 2 
So z = 2, y = 3 + 2 = 5 and x = −10 + 35 − 24 = 1.
Hence this system has the unique solution x = 1, y = 5, z = 2.
A
A
A
E
A
A
E
A
E
A
A
A
E
A
E
A
A
E
A
A
E
A
A
E
A
A
E
A
A
57
E
 3x + 2y − 5z = 3
Example 7: Find the solution(s) to the system:  4x − 5y + 7z = −7 .
11x − 8y + 9z = −11
 3 2 −5 | 3 
 3 2 −5 | 3 
Solution:  4 −5 7 | −7  →  1 −7 12 | −10 R2 − R1
11 −8 9 | −11
11 −8 9 | −11
 1 −7 12 | −10
→  3 2 −5 | 3  R1 ↔ R2
 11 −8 9 | −11
1 −7 12 | −10
→ 0 23 −41 | 33  R2 − 3R1, R3 − 11R1
0 69 −123 | 99 
 1 −7 12 | −10
→  0 23 −41 | 33  R3 − 3R2
0 0 0 | 0 
The system has contracted from 3 equations in 3 variables to just two. We’ll therefore get infinitely
many solutions. We may choose z arbitrarily.
33 41
Let z = k. Then 23y = 33 + 41k, so y = 23 + 23 k and hence
1
11
33 41 
x = −10 + 7. + 23k − 12k = 23 + 23 k.
23

Alternatively, we could let z = 23k. It doesn’t matter because 23k can represent an arbitrary number
33
just as well as k. Now we have 23y = 33 + 41(23k) so y = 23 + 41k. We have reduced the number
of fractions, but of course we can’t always get rid of them completely.
1
33

Finally x = −10 + 7. 23 + 41k − 12(23k) = 23 + 11k. This gives the same solutions as above,


although the values of k are different. The solution that corresponds to k = 1 in the first solution
1
corresponds to k = 23 in the second.
A
E
A
A
E
A
A
A
E
A
A
A
E
E
A
A
E
A
A
A
E
A
A
E
E
A
A
E
E
A
A
A
A
E
A
A
A
E
E
A
A
E
E
A
A
A
 3x + 2y − 5z = 3
Example 8: Find the solution(s) to the system:  4x − 5y + 7z = −7 .
11x − 8y + 9z = 11
Solution: This is almost the same system above. It differs only in the constant term of the last
equation.
 3 2 −5 | 3 
 3 2 −5 | 3 
 4 −5 7 | −7 →  1 −7 12 | −10 R − R
1

 2


11 −8 9 | 11 
11 −8 9 | 11 
 1 −7 12 | −10
→  3 2 −5 | 3  R1 ↔ R2
 11 −8 9 | 11 
1 −7 12 | −10
→ 0 23 −41 | 33  R2 − 3R1, R3 − 11R1
0 69 −123 | 121
 1 −7 12 | −10
→  0 23 −41 | 33  R3 − 3R2
 0 0 0 | 22 
The last equation is inconsistent because it asserts that 0 = 22. No choice of x, y and z will make
this possible. Hence this system has no solutions.
A
A
A
E
A
E
A
A
E
A
A
A
E
E
A
A
A
58
E
Sometimes we have a system with infinitely many solutions but we only want the integer
solutions. In this case we solve the system as usual, getting rational solutions. Then we use our
knowledge of solving linear congruences.
7k − 13
For example if we obtained y = 47
we would need 7k − 13 to be a multiple of 47 to get
an integer value of y, So we would solve the congruence 7k ≡ 13(mod 47). Where the coefficient is
small, as in this case, we simply rewrite the constant by adding multiples of the modulus until we
can cancel. Remember that it’s permissible to divide a linear congruence by any integer that is
coprime with the modulus.
In this case we’d write 7k ≡ 13 ≡ 60 ≡ 107 ≡ 154(mod 47), so k ≡ 22(mod 47). This means
141 + 7.47h
= 7h + 3.
that k = 22 + 47h for some integer h and hence y =
47
A
E
A
A
E
A
 3x + 2y − 5z = 3
Example 9: Find an integer solution to the system:  4x − 5y + 7z = −7 .
11x − 8y + 9z = −11
Solution: We solve it as in example 8, getting the general solution:
1
11
33 41
x = 23 + 23 k, y = 23 + 23 k, z = k.
Now for an integer solution we need to have 11k ≡ −1(mod 23).
The general method for solving such congruences is to use the Euclidean algorithm, but here
there’s a much easier way, since −1 ≡ 22(mod 23).
So the congruence becomes 11k ≡ 22(mod 23), and since 11 is coprime with 23 we may
divide both sides by 11, getting k ≡ 2(mod 23). So we get an integer solution for y by taking k = 2.
This gives x = 1, y = 5, z = 2.
A
A
E
A
A
E
A
A
E
A
A
A
E
E
A
Example 10: Solve the system:
2 + 3x3 + 4x4 = 5
 xx11 ++ 2x
2x2 + 3x3 + 6x4 = 9
+
4x
2x
 1 2 + 6x3 + 12x4 = 18 .
1 + 6x2 + 11x3 + 23x4 = 39
x−x
1 + x2 + 3x3 + 12x4 = 24
A
1

1
Solution:  2

1

 −1
2
3
4
2
3
6
4
6
12
6 11 23
1
3
12
A
1 2
5


9
0 0

18 →  0 0


0 4
39 


24 
0 3
1 2

0 0
→ 0 0

0 1

0 3
3
4
0
0
2
4
8 19
6 16
3 4
0 2
0 4
2 3
6 16
59
E
5

4
8  R2−R1, R3−2R1, R4−R1, R5+R1

34 

29 
5

4
8  R4−R5 This gets a 1.

5

29 
1

0
→ 0

0

0
1

0
→ 0

0

0
5

1 2 3
5
0 0 4
8  R2↔R4

0 0 2
4

3 6 16 29 
2 3 4 5

1 2 3 5
0 0 4 8  R5−3R2

0 0 2 4

0 0 7 14 
1 2 3 4 5 


0 1 2 3 5 
→  0 0 0 1 2  R3÷4


0 0 0 2 4 


 0 0 0 7 14 
1 2 3 4 5


0 1 2 3 5
→  0 0 0 1 2  R4−2R3, R5−7R3


0 0 0 0 0


0 0 0 0 0
The solution to the system of equations is x4 = 2, x3 = k, x2 = 5 − 6 −2k = −1 − 2k, that is,
x2x1==−1k −− 12k
 x3 = k for all values of k.
 x4 = 2
2 3
A
4
A
E
§4.4. Systems of Homogeneous Linear Equations
A homogeneous system of linear equations is a system where all the constant terms are
zero. These are solved in exactly the same way as any other system. The main difference is that
because the constant terms will remain as zeros throughout the calculation we can omit them
altogether and just deal with the matrix of coefficients. Of course a homogeneous system always
has the trivial solution x1 = x2 = ... = 0. They are of interest when there are non-trivial solutions.
Example 11: Solve the homogeneous system
1

1
Solution:  2

1
 −1

2 3 4
1 2


2 3 6
0 0

4 6 12 →  0 0


6 11 23 
0 4
0 3
1 3 12 

2 + 3x3 + 4x4 = 0
 xx11 ++ 2x
2x2 + 3x3 + 6x4 = 0
2x1 + 4x2 + 6x3 + 12x4 = 0 .
1 + 6x2 + 11x3 + 23x4 = 0
x−x
1 + x2 + 3x3 + 12x4 = 0
A
A
4
1 2


2
0 0

0 4 → 0 0


8 19 
0 1
0 3

6 16 

3
0
60
3
0
0
2
6
E
4
1 2


2
0 1
4  → 0 0


3
0 0
0 3

16 

3
2
0
0
6
4

3
4

2
16 
1

0
→ 0

0
0

2 3
1 2
0 0
0 0
0 0
4
1 2


3
0 1
4 →  0 0


2
0 0
0 0

7

3 4
1 2


2 3
0 1
0 1 → 0 0


0 2
0 0


0 7
0 0
3 4

2 3
0 1 .

0 0
0 0 
The solution to the system of equations is x4 = 0, x3 = k, x2 = − 2k, x1 = − 2(−2k) − 3k = k.
 k 
 1 


 
 − 2k 
 − 2
So the solution is v = 
= k   for arbitrary k.

k
1


 
 0 
 0 


 
A homogeneous system has the form Av = 0 for some matrix A. Clearly with a
homogeneous system the sum of any two solutions is a solution and any scalar multiple of a
solution is a solution. We say that the set of solutions of a homogeneous system is a vector space.
In the above example it is 1-dimensional, and can be represented by a line in 4-dimensional space.
The solution sets of some homogeneous systems have higher dimension. For example a certain
32 11
homogeneous system might have the form h 1 + k 1 for arbitrary h, k. We say that this is a
0 1
2-dimensional vector space. However the concepts of vector space and dimension are discussed in
another set of notes.
A
E
A
A
E
A
§4.5. The Gauss-Jordan Algorithm
Although solving a system of equations in echelon form is easy by back substitution nothing
would beat an echelon form that looks like (I | b). For example if we were able to reduce the
1 0 0 1


augmented matrix to the echelon form:  0 1 0 2  we could read off the solution as
0 0 1 3


x = 1, y = 2, z = 3.
 1 2 3 14 


If we obtained the echelon form  0 1 4 14  by the Gaussian algorithm we could
0 0 1 3 


continue to use elementary operations until the matrix of coefficients was the identity matrix.
1 2 0 5
 1 2 3 14 




 0 1 4 14  →  0 1 0 2  R1−3R3, R2−4R3
0 0 1 3 
 0 0 1 3




1 0 0 1


→  0 1 0 2  R1−2R2
0 0 1 3


Of course this only works if there’s a unique solution.
61
 3x + 2y − 5z = 3
Example 8: Solve the system: 4x − 5y + 7z = −7 .
11x − 2y + 3z = 7
A
A
E
 3 2 −5

Solution: We begin by putting the augmented matrix,  4 − 5 7
11 − 2 3

3 

− 7  , in echelon form.
7 
Since the augmented matrix has integer components and we are doing this by hand we won’t follow
 1 − 7 12 − 10 


the Gaussian algorithm exactly. As above we get  0 1 − 1
3  by suitable elementary row

2 
1
0 0
operations. The fact that the matrix of coefficients is square, and we have no zero rows, guarantees
that it’s possible to obtain the identity matrix by further elementary row operations. So, instead of
using back-substitution as before, we continue until we get the identity matrix as the matrix of
coefficients.
 1 − 7 0 − 34 
 1 − 7 12 − 10 




5  R1−12R3, R2+R3
3  → 0 1 0
 0 1 −1

0 0
2 
2 
1
0 0 1

1 0 0 1


→  0 1 0 5  R1 + 7R2
0 0 1 2


Now we can read off the solution in the last column.
The Gauss-Jordan algorithm is the best one to use on a computer because it’s easier to
implement than back-substitution. But doing things by hand it’s better just to use the Gaussian
algorithm, or a variation of it, and then back-substitution because it involves less writing. The
amount of computation is the same in both cases.
EXERCISES FOR CHAPTER 4
 3x + 2y + z = 1
Exercise 1: Solve the system of equations:  2x − y + 5z = −2 .
5x + 7y + 2z = 13
A
A
E
 5x + y + 2z = 13
Exercise 2: Solve the system: 2x + 3y + 8z = 32 .
7x − 4y + 6z = 17
A
A
E
 4x + y + 7z = 0
Exercise 3: Solve the homogeneous system:  10x − 5y + 2z = 0 .
−8x + 13y + 17z = 0
A
A
 4x + y + 7z = 7
Exercise 4: Solve the system:  10x − 5y + 2z = −3 .
−8x + 13y + 17z = 10
A
A
62
E
E
 4x + y + 7z = 25
Exercise 5: Find the solutions to the system:  10x − 5y + 2z = 32 .
−8x + 13y + 17z = 11
A
A
E
 4x + y + 7z = 25
Exercise 6: Find the integer solutions to the system:  10x − 5y + 2z = 32 .
−8x + 13y + 17z = 11
A
A
E
 3x − 5y + 7z = 17
Exercise 7: Find the integer solutions to the system:  8x + y − 3z = 13 .
7x + 17y − 27z = −22
A
A
2x − 5y + 7z = 16
Exercise 8: Find two integer solutions to the system:  5x + y + 6z = 11 .
3x − 5y + 7z = 16
A
A
E
SOLUTIONS FOR CHAPTER 5
1 3 −4 | 3 
3 2 1 | 1 


Exercise 1: 2 −1 5 | −2  → 2 −1 5 | −2  R1 − R2
5 7 2 | 13 
5 7 2 | 13 
1 3 −4 | 3 
→ 0 −7 13 | −8  R2 − 2R1, R3 −5R1
0 −8 22 | −2 
1 3 −4 | 3 
→ 0 1 −9 | −6  R2 − R3
0 −8 22 | −2 
1 3 −4 | 3 
→0 1 −9 | −6  R3 + 8R2
0 0 −50 | −50 
1 3 −4 | 3 
→ 0 1 −9 | −6 R3 ÷ (−50)
0 0 1 | 1 
So z = 1, y = −6 + 9 = 3, x = 3 + 4 − 9 = −2.
A
E
A
E
A
A
A
E
A
A
E
A
A
E
A
 5 1 2 13 
1



Exercise 2:  2 3 8 32  →  2
 7 − 4 6 17 


7

1

→ 0
0

1

→ 0
0

E
A
A
− 5 − 14 − 51

8
32  R1 − 2R2
3
−4
17 
6
− 5 − 14 − 51

13 36 134  R2 − 2R1, R3 − 7R1
31 104 374 
− 5 − 14 − 51

13 36 134  R3 − 2R2
5
32 106 
63
E
 1 − 5 − 14 − 51 


→  0 − 2 − 60 − 184  R2 − 3R3
0 5
32 106 

 1 − 5 − 14 − 51 


→  0 − 2 − 60 − 184  R3 + 2R2
 0 1 − 88 − 262 


 1 − 5 − 14 − 51 


→ 0 1
− 88 − 262  R2 + 2R3, R2 ↔ R3
 0 0 − 236 − 708 


 1 − 5 − 14 − 51 


→  0 1 − 88 − 262  R3 ÷ (−236)
0 0
3 
1

So z = 3,
y = − 262 + 88.3 = − 262 + 264 = 2,
x = − 51 + 10 + 42 = 1.
1 7
 2 = 7 − 12 
 4




Exercise 3:  10 − 5 2  →  4
1
7 
 − 8 13 17 
 − 8 13 17 




 2 = 7 − 12 


→  0 15
31 
 0 − 15 − 31


 2 = 7 − 12 


→  0 15 31  .
0 0
0 

So z = k,
31
15y = −31k whence y = −15 k,
37
37
−217 + 180
 31
 k = − k, so x = − k.
2x = 7−15 k + 12k = 
15
15
30




 − 37 / 30 


The solutions are all the multiples of  − 31 / 15  , or equivalently, all the multiples of
 1 


A
A
E
A
A
E
A
E
A
 2
 4
1 7 7 



Exercise 4:  10 − 5 2 − 3  →  4
−8



 − 8 13 17 10 
2

→ 0
0

A
E
A
A
E
A
− 7 − 12 − 17 

1
7
7 
13 17 10 
− 7 − 12 − 17 

15
31 41 
− 15 − 31 − 58 
64
 37 


 62  .
 − 30 


 2 − 7 − 12 − 17 


→  0 15 31 41 
0 0
0 − 17 

The system is inconsistent. There are no solutions.
 2 −7
 4
1
7 25 



Exercise 5:  10 − 5 2 32  →  4
1
 − 8 13 17 11 
 − 8 13



2 − 7

→  0 15
 0 − 15

− 12 − 18 

7
25 
17 11 
− 12 − 18 

31 61 
− 31 − 61
 2 − 7 − 12 − 17 


→  0 15 31 61 
0 0
0 
0

Let z = k.
61 − 31k
.
15
−255 + 427 − 217k + 180k 202 + 70k
202 + 70k
61 − 31k
 + 12k =
2x = − 17 + 7 
=
so x =
.
15
15
30
 15 
Then 15y = 61 − 31k, so y =
A
E
A
E
A
A
A
E
A
A
E
A
A
E
A
Exercise 6: We found the complete solution to this system in the previous exercise. It is
202 + 70k
61 − 31k
x=
, y=
, z = k.
30
15
For integer solutions we need 70k ≡ − 202(mod 30). Reducing modulo 30 we get 10k ≡ 8(mod 30).
Since 10 and 30 are multiples of 5 and 8 is not, there are no solutions to this congruence and hence
no integer solutions to the system of linear equations.
A
E
A
A
E
A
Exercise 7:
3 −5 7 | 17 
3 −5 7 | 17 
1 −16 24 | 35 
1 −16 24 | 35 
8 1 −3 | 13  → 1 −16 24 | 35  → 3 −5 7 | 16  → 0 43 −65 | −89  →








7 17 −27 | −22 
7 17 −27 | −22 
0 129 −195 | −267
7 17 −27 | −22
1 −16 24 | 35 
1 −16 24 | 35 
0 43 −65 | −89 → 0 1 −65/43 | −89/43 .




0 0 0 | 0 
0 0
0 | 0 
The complete solution is
z = k,
89 65
65k − 89
y = − 43 + 43 k = 43
.
65k − 89
x = 35 − 24k + 16  43 


8k + 81
= 43 .
Now for integer solutions we need 8k + 81 to be a multiple of 43, that is
8k ≡ −81 ≡ 5(mod 43)
≡ 48(mod 43).
A
E
A
A
A
E
A
E
A
A
E
A
A
A
E
A
A
A
E
E
E
A
A
E
A
A
E
A
65
A
A
E
A
Since 8 is coprime with 43 we may divide this congruence by 8 to obtain k ≡ 6(mod 43).
This gives the integer solutions as
8(43h + 6) + 81
x=
= 8h + 3, for some h
43
65(43h + 6) − 89
y=
= 65h + 7 and
43
z = 43h + 6.
 1 − 16 15 37 
 2 − 5 7 16 




Exercise 8:  5 1 6 11  →  5
1
6 11 
 2 − 5 7 16 
 3 − 1 7 16 




A
E
A
E
A
E
A
E
 1 − 16 15
37 


→  0 81 − 69 − 174 
 0 27 − 23 − 58 


 1 − 16 15 37 


→  0 27 − 23 − 58 
0
0
0
0 

Let z = k.
Then 27y = − 58 + 23k so y =
A
− 58 + 23k
.
27
E
A
− 58 + 23k
 − 15k
x = 37 + 16 
27


999 − 928 + 368k − 405k
=
27
71 − 37k
=
.
27
For an integer solution we would need 37k ≡ 71(mod 27) and 23k ≡ 58(mod 27).
Reducing these modulo 27 these become 10k ≡ 17(mod 27) and −4k ≡ 4(mod 27).
The first equation simplifies to k ≡ −1(mod 27). Remember that we are allowed to divide both sides
by 4 since 4 is coprime with 27. Then 10k ≡ −10 ≡ 17(mod 27), so the two equations are
equivalent.
Hence z = k = 27h − 1 for some integer h.
71 − 37(27h − 1) 71 + 37 − 37.27h 108 − 37.27h
Then x =
=
=
= 4 − 27h.
27
27
27
− 58 + 23(27h − 1) − 58 − 23 + 23.27h − 81 + 23.27h
y=
=
=
= − 3 + 23h.
27
27
27
Take h = 0. Then x = 4, y = − 3, z = −1 is an integer solution.
Take h = 1. Then x = 26, y = 20, z = 26 is another integer solution.
A
E
A
A
E
A
E
A
A
E
A
A
E
A
A
E
E
A
E
A
A
E
A
A
E
E
66
A
A