Download and x

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 calculus wikipedia , lookup

Cubic function wikipedia , lookup

Quadratic equation wikipedia , lookup

Eigenvalues and eigenvectors wikipedia , lookup

Quartic function wikipedia , lookup

Matrix multiplication wikipedia , lookup

Linear algebra wikipedia , lookup

Elementary algebra wikipedia , lookup

Signal-flow graph wikipedia , lookup

System of polynomial equations wikipedia , lookup

Gaussian elimination wikipedia , lookup

History of algebra wikipedia , lookup

Equation wikipedia , lookup

System of linear equations wikipedia , lookup

Transcript
TBF 122 - General Mathematics - II
LECTURE – 1 : Systems of Linear Equations,
Matrices
Prof. Dr. Halil İbrahim Karakaş
Başkent University
Systems of Linear Equations in two Variables.
We start with a problem from daily life.
Problem. In a grocery store, one customer pays 9 TL for 3 kilograms of apples and 1 kilogram
of oranges; another customer pays 8 TL for 1 kilogram of apples and 2 kilograms of oranges.
Find the prices of apple and orange.
Solution. Let 1 kg of apples cost x TL and 1 kg of oranges cost y TL. Then the first customer
pays 3x + y = 9 TL, the second customer pays x + 2y = 8 TL.
Our task is to find numbers x and y satisfying the two equations 3x + y = 9 ve x + 2y = 8
simultaneously.
Thus the mathematical model of our problem can be formulated as
“Find the numbers x and y satisfying 3x + y = 9 and x + 2y = 8 simultaneously .”
Before continuing the solution of the problem, we will define some terms related to the
subject.
Given a, b, h  ℝ where a and b are not both zero, the equation ax + by = h is called a
linear equation in two variables. The symbols x and y are called variables, the numbers
a and b are called coefficients , and the number h is called the right hand side constant.
An ordered pair (x0 , y0 ) of real numbers is called a solution of ax + by = h if it satisfies
that equation; i.e., ax0 + by0 = h. The set of all solutions of a linear equation is called the
solution set of that equation.
Example. Some solutions of 3x + y = 9 are (0,9), (1, 6), (3,0), (-1,12). Is (2,4) a solution of
that equation? Why or why not? Substitute t for x and solve for y for each t  ℝ. You
obtain y = - 3t + 9. Thus (t , -3t + 9) is a solution of this equation for each t  ℝ. On the
other hand, if the first component of a solution is t, then its second component is -3t + 9.
Therefore the solution set is {(t,-3t + 9) : t  ℝ}.
Geometrically, recall that the graph of a linear equation
is a line in the plane. The solutions of the linear equation
are the ordered pairs which are the coordinates of points
on the graph. Solutions of the linear equation 3x + y = 9
of the above example are the pairs corresponding to the
points on the line given on the right.
y
(0,9)
(3,0)
3x+y=9
x
Given a, b, c, d, h, k  ℝ where at least one of a, b and at least one of c, d are different
from zero, the collection of linear equations
ax  by  h

cx  dy  k
is called a system of linear equations(in two variables). An ordered pair (x0 , y0 ) of real
numbers which is a solution of each equation in a system of linear equations is called a
solution of the system.
The mathematical model of the problem in the beginning can be formulated with the new
terms as follows:
3x  y  9
Solve the sytem of linear equations 
 x 2y  8
There are several methods of determining the solution set of a system of linear equations:
Graphing, Substitution, Elimination.
We will give examples for each of these methods.
Graphing. Recall that the graph of every linear equation is a line in the plane.
Two lines in the plane may be located in three different positions:
intersecting
parallel
coincident
To obtain the solution set of a system of linear equations in two varibles, the lines
corresponding to the equations in the system are drawn on the same coordinate plane(for
example on the same graph paper) and and the solution set is determined by looking at the
common points of these lines.
ax  by  h
If the lines corresponding to 
are
cx

dy

k

 intersecting, then the system has a unique solution,
 parallel, then the system has no solution,
 coincident, then the system has infinitely many solutions.
y
3x  y  9
Example. 
 x  2y  8
(0,9)
(0,4)
(2,3)
(3,0)
x
(8,0)
x+2y=8
Solution Set: S = {(2 , 3)}.
3x + y = 9
y
 x  2y  2
2 x  4 y  8
Example. 
(0,2)
(-2,0)
(4,0)
x
(0,-1)
2x +4y = 8
x +2y = -2
Solution Set: S = .
y
 x  2y  4
2 x  4 y  8
Example. 
(0,2)
(4,0)
x
2x +4y = 8
x +2y = 4
Solution Set: S = {(t,-(1/2)t+2) : t  ℝ}.
You can use graphing technique wthout garph paper. For example
y
2 x  y  3

 x  2y  4
3
-3/2
-4
x
-2
Try to estimate the coordinates of the point of intersection of the two lines from the
graph.
Could the y – coordinate be -1? If so, what could we say about the x – coordinate?
For instance, substituting y = -1 in the first equation, do we get x = -2?
Does (-2, -1) satisfy both equations?
Hence S = {(-2, -1) }.
Substitution. Using one of the equations, one of the variables is expressed in terms of the
other variable and substituted in the other equation.
Example.
3x  y  9

 x  2y  8
y = 9 – 3x
x + 2(9 – 3x) = 8
x + 18 – 6x = 8
18 – 5x = 8
5x = 10
x=2
y=9-6
y=3
Solution set: S = {(2 , 3)}.
Example.
3x  y  2

2 x  3y  5
y = 2 – 3x
2x – 3(2 – 3x) = 5
2x – 6 + 9x = 5
– 6 + 11x = 5
11x = 11
x=1
y=2-3
y = -1
Solution Set: S = {(1 , -1)}.
Example. 4 x  2y  4

2 x  y  5
y = 2x – 5
4x – 2(2x – 5) = 4
4x – 4x + 10 = 4
10 = 4
!!!...
Solution Set: S = .
Example. 4 x  2y  4

2 x  y  2
y = 2x – 2
4x – 2(2x – 2) = 4
4x – 4x + 4 = 4
4=4
!!!...
Solution Set: S = {(t , 2t - 2) : t ℝ}.
Elimination. A series of operations are applied to a given system of linear equations, step by
step, so that at each step we obtain a system which has the same solution set as the given
system but easier to solve. In the last step we get a system whose solution set is so obvious s
that we get the solution set of the given system from the last one.
Two systems of linear equations are said to be equivalent if they have the same solution set.
Example. 3x  y  9 and

 x  2y  8
 3x  y  9
are equivalent, because the solution set

  10
  5x
of each system is S = {(2 , 3)}.
Method of elimination is realized by applying the following theorem.
Theorem. Each of the following operations transforms a given system of linear equations to
an equivalent sytem of linear equations:
A. Interchanging two equations.
B. Multiplying an equation by a nonzero constant.
C. Adding a constant multiple of one equation to the other equation.
3x  y  9
Example. 
 x  2y  8
(-2)  (first) + (second)
(-1/5)  (second)
(-3)  (second) + (first)
(second)  (first)
 3x  y  9

 10
 5 x
3x  y  9

2
 x


 x
y 3
2
x


2
y 3
Solution Set : S = {(2 , 3)}.
 x  2y  4
Example. 
2 x  4 y  8
(-2)  (first) + (second)
 x  2y  4

00

y
1
x 2
2
x = t  y = (-1/2) t + 2
Solution Set : S = {(t,-(1/2)t+2) : t ℝ}.
Example.
 x  2y  4

 2 x  4 y  12
(-2)  (first) + (second)
 x  2y  4

04

!!!...
Solution Set : S = .
Example. 3x  2y  8
5  (first) , 2  (second)

2 x  5y  1
15x  10y  40

 4 x  10y  2
(first) + (second)
15x  10y  40

 38
 19 x
(1/19)  (second)
15x  10y  40

 2
 x
-15  (second) + (first)
(-1/10)  (first)
(second)  (first)
  10y  10

 2
x
 y  1

 2
x
x


 2
y  1
Solution Set : S = {(2 , -1)}.
Mathematical models of many real life problems turn out to be systems of linear equations.
We shall have many examples as below in the course of our lectures.
Supply and Demand. The amount of a product that will be demanded by the consumers in a
certain time interval depends on the price of the product. Generally, the demand decreases
as the price increases; the demand increases as the price decreases. Similarly, the amount
of a product that the producer will be willing to sell in a certain time interval also depends
on the price of the product in the market. In general, the producer is willing to sell more if
he or she finds customers willing to by his or her product at a high price. Marketing research
departments can determine the amount of a product that the consumers are willing to
purchase or the producers are willing to sell at a given price. The equation that gives the
amount of a product the consumers are willing to purchase at a certain price is called the
price – demand equation; the equation that gives the amount of a product the producers
are willing to sell at a certain price is called the price – supply equation.
Problem. Research about cherry sales in a town shows that if x ton(s) of cherry will be
supplied at a price of p TL per ton, price – supply equation will be
p = -(0.2)x + 3.9,
if x ton(s) of cherry will be demanded at a price of p TL per ton, price – demand
equation will be
p = (0.08)x + 0.54.
Find the equilibrium price , that is, the price for which supply and demand coincide.
Problem. Research about cherry sales in a town shows that if x ton(s) of cherry will be
supplied at a price of p TL per ton, price – supply equation will be
p = -(0.2)x + 3.9,
if x ton(s) of cherry will be demanded at a price of p TL per ton, price – demand
equation will be
p = (0.08)x + 0.54.
Find the equilibrium price , that is, the price for which supply and demand coincide.
Solution. For instance, suppose demand of the market is 10 tons. According to the pricedemand equation, the price should be 1.9 TL; but according to the price-supply equation, at
this price 17 tons of cherry should be supplied. Thus the amount supplied will be more than
the demand. Equilibrium price is the price satisfying both the price-supply equation and the
price–demand equation for the same amount of product. In other words, the values of p and
x satisfying both equations give the equilibrium price and the equilibrium quantity. Now we
solve the following system of linear equations.
p  (0.2)x  3.9

p  (0.08)x  0.54
p= -(0.2)x + 3.9
-(0.2)x + 3.9– (0.08)x = 0.54
-(0.28)x = -3.36
x = 12 , p = 1.5
Equilibrium price is p = 1.5 TL. x = 12 tons of cherry should be supplied(equilibrium
quantity).
Problem. For a new product in the market, the price-demand equation is p = (-0.05)x + 70
and the price-supply equation is p = (0.001)x + 8.8 (in TL). Here x denotes (in kg ) the
amount of product supplied or demanded, respectively. Find the equilibrium price and the
equilibrium quantity.
Solution.
The solution set of the system on the right will lead to
the answers. We apply the method of substitution
p  (0.05)x  70

p  (0.001)x  8.8
p =(-0.05)x + 70
p  (0.05)x  70

p  (0.001)x  8.8
(-0.05)x + 70 - (0.001)x = 8.8
(-0.051)x = -61.2
x
61200
 1200
51
Equilibrium price is p = 10 TL. Equilibrium quantity is x = 1200 kg.
Systems of Linear Equations in Several Variables.
Consider the following problem which is obtained from the problem in the beginning of this
lecture by minor changes.
Problem. In a grocery store, one customer pays 12 TL for 3 kilograms of apples, 1 kilogram of
oranges and 1 kilogram of bananas; another customer pays 14 TL for 1 kilogram of apples, 2
kilograms of oranges and 2 kilgrams of bananas. How much does a kilogram of apples cost?.
For the solution, we may proceed as in the beginning of the lecture. We assume that 1 kg
apple costs x TL, 1 kg of orange costs y TL and 1 kg of banana costs z TL. Then the first
customer pays 3x + y + z =12 TL and the second customer pays x + 2y + 2z =14 TL. The task is
to determine the value of x for which both equations are satisfied.
We see that the mathematical model of this problem also involwes linear equations. These
new equations contain, in addition to x and y, a new variable z and coefficients belonging
to that variable. The new variable arises because of a new fruit(banana) is being purchased. If
another kind of fruit-say pomagranades- were purchased another variable would arise.
In constructing a mathematical model for a problem, we use the letters x, y and z for the
variables if the number of variables is three or less; If the number of variables is more than
three, then to denote the variables we use the same letter with subscripts. For instance, we
may use x1 , x2 , x3 , x4 , x5 for five variables.
Let us note that if a third customer comes and buys some from the same fruits, this gives
rise to a third equation in the mathematical model.
The above discussion leads to the concepts of linear equations and systems of linear
equations in several variables.
Given a1, a2, . . . , an , b  ℝ where at least one of a1, a2, . . . , an is nonzero, the expression
a1x1 + a2x2 + . . . + an xn = b
is called a linear equation in n variables. The numbers a1, a2, . . . , an are called the
coefficients and b is called the right hand side constant of the equation.
Given n real numbers c1, c2, . . . , cn, if a1c1 + a2c2 + . . . + an cn = b, then the ordered
n-tuple (c1, c2 , . . . , cn ) is called a solution of a1x1 + a2x2 + . . . + an xn = b.
Example. (2,3,4) and (2,2,4) are two solutions of 3x + y + z =12. Are these triples also
solutions of the linear equation x +2 y + 2z =14?
A collection
a11 x1  a12 x2    a1n x n  b1
a x  a x    a x  b
 21 1 22 2
2n n
2



am1 x1  am2 x2    amn x n  bm
of m linear equations in n variables (where aij , bj  ℝ , 1  i  m , 1  j  n) is called
a system of linear equations in n variables.
By a solution of a system of linear equations in n variables we mean an ordered n-tuple
which is a solution of each linear equation in the system.
Now the mathematical model of the problem under discussion can be given as follows:
Solve the system of linear equations
3x  y  z  12

 x  2y  2z  14
A carefull reader can observe that the solution of the mathematical model will give more
than what is required in the problem. Ofcourse, one can formulate the mathematical
model to give only what is required in the problem. In the problem, the value of x for each
solution of the system is expected to be the same. Try to find out that value of x.
In our next lecture, we will explore a very effective method of solving systems of linear
equations in several variables. This method is essentially based on the method of
elimination that we have used for systems of linear equations in two variables, but we
need some preparation to adopt it for systems of linear equations in several variables. The
rest of this lecture will be devoted to that preparation.
Two systems of linear equations are said to be equivalent if they have the same solution
set.
As for systems of linear equations in two variables, given a system of linear equations in
several varibles, we use the following operations A, B and C to obtain a system which is
equivalent to the given one such that the new system is easier to solve.
Theorem. Each of the following operations transforms a given system of linear equations to a
sytem of linear equations which is equivalent to the given one:
A. Interchanging two equations.
B. Multiplying an equation by a nonzero constant.
C. Adding a constant multiple of one equation to another equation.
Theorem. Each of the following operations transforms a given system of linear equations to a
sytem of linear equations which is equivalent to the given one:
A. Interchanging two equations.
B. Multiplying an equation by a nonzero constant.
C. Adding a constant multiple of one equation to another equation.
It is clear that we can use the above theorem, as in the two variables case, to solve systems
of linear equations in three or more variables.
Namely, we can adopt the method of elimination for systems of linear equations in several
variables.
Example. Let us solve the mathematical model of the grocery problem by the method of
elimination.
3x  y  z  12

 x  2y  2z  14
 3x  y  z  12
 
 10
 5 x
3x  y  z  12
 
2
 x
 y  z 6
 
2
x
2
x
 
 y  z 6
-2 times the first equation is
added to the second equation
The second equation is multiplied by -1/5
-3 times the second equation is
added to the first equation
The two equations are interchanged
We see that x = 2 for any solution. Therefore a kg of apples costs 2 TL. Try to write down
all solutions of the mothematical model above.
Example. A part of 36 thousand TL is deposited in A-bank, a part of it in B-bank and
the remaining part in C-bank. The total amount deposited in A-bank and B-bank is 6
thousand TL more than the amount deposited in C-bank; the total amount deposited in
A-bank and C-bank is 3 thousand TL less than twice the amount deposited in B-bank.
How much TL is deposited in each bank?
Solution. Let the amount deposited in A-bank be x thousand TL, the amount deposited in
B-bank be y thousand TL and the amount deposited in C-bank be z thousand TL. Then
x  y  z  36
x y  z6
x  z  2y  3
Thus the solution of the problem is reduced to the solution of the system
 x  y  z  36

x  y  z  6
 x  2y  z  3

The solution is on the next slide.
x  y  z  36

x  y  z  6
x  2y  z  3

 x  y  z  36

   2z  30
  3y  39

-1 times the first equation is added first to
the second and then to the third equation
 x  y  z  36

 
z  15

y  13

The second equation is multiplied by -1/2
and the third equation is multiplied by -1/3
x

 


x

 


8
z  15
y  13
8
y  13
z  15
-1 times the second equation and -1 times the
third equation are added to the first equation.
The second and the third equations are
interchanged
The last system shows that the solution set is S = {(8,13,15)}. Thus 8 thousand TL is
deposited in A-bank, 13 thousand TL in B-bank and 15 thousand TL in C-bank.
The method of elimination is rather convenient for systems of linear equations in two or
three variables, but it becomes very difficult to apply this method as the number of
variables and the number of equations increase. In fact, imagine yourself solving a
system of 8 linear equations in 10 variables! It is boring, isn’t it? Besides, the number of
equations and the number of variables might be in hundreds or thousands.
The method of elimination is revised in such a way that it is convenient to apply for
systems of linear equations of any size where the number of of variables and the number
of equations may be different and as large as you wish. The revised method is called
Gauss-Jordan Elimination. The main tools used in this method are matrices (“matrices” is
the plural of the word “matrix”).
Gauss-Jordan Elimination Method is based on the observation that a system
a11 x1  a12 x2    a1n x n  b1
a x  a x    a x  b
 21 1 22 2
2n n
2



am1 x1  am2 x2    amn x n  bm
of m linear equations in n variables is completely determined by the array of real numbers
a11 a12
a
 21 a22


am1 am2
 a1n
 a2n

 amn
b1 
b2 


bm 
formed by the coefficients and the right hand side constants in the system. In fact, if this
array is given, it is not difficult to rewrite the system of linear equations which gave rise to
this array. This array is called the augmented matrix of the system. Note that the
augmented matrix of a system of m linear equations in n variables has m rows (as many
as the number of equations) and (n+1) columns (one more than the number of variables).
The last column corresponds to the right hand side constants and that column is separated
from the others by a vertical line.
At this point, the reader is recommended to practice writing down the augmented matrix of
a given system of linear equations or the system of linear equations of a given augmented
matrix.
Example. The augmented matrix of the system
3x  y  z  12

 x  2y  2z  15
the augmented matrix of
The matrix
is
3 4  1 2 5
2  3 7 1 4 


1 2
0 4 3
is the augmented matrix of
3x1  4 x2  x 3  2 x 4  5

2 x1  3x2  7 x 3  x 4  4
 x  2x
 4 x4  3
2
 1
3x  y  9

 x  2y  8
3 1 1 12
1 2 2 15


is
.
3 1 9
1 2 8 ,


Matrices. We have seen that in solving a system of linear equations by Gauss-Jordan
elimination method, the coefficients and the right hand side constants play the main role
and they form the augmented matrix of the system. Matrices are used to make the process
of elimination more effective and also make it possible to use computers.
Let us note that matrices are important mathematical entities on their own and they have
other applications.
An array of mn real numbers arranged to form m rows and n columns is called an mn matrix.
For instance, we see a 2 × 3 matrix A and a 4 × 3 matris B below.
 5
A
 2
3  1
4 1
,
3  1
 5
 2
4 1

B
 4  5 2 


6
0
3


Each number in a matrix is called an entry of the matrix. The matrix A above has 6
entries; they form 2 rows and 3 columns; the matrix B has 12 entries and they are
arranged to form 4 rows and 3 columns.
We refer to entries of a matrix according to the row and column they belong to. The common
entry in the i – th row and the j – th column is called the i-j entry of the matrix. For
instance, The 1-2 entry of A is 3, B the 3-2 entry of B is -5.
An m × n matrix A is usually depicted as follows
a11 a12
a
21 a22
A 


am1 am2
 a1n 
 a2n 



 amn 
The expression m × n is called the magnitude of A; m and n are called the dimensions of
the matrix A.
A matrix consisting of one single row is called a row matrix, and a matrix consisting of one
single column is called a column matrix. For instance, the 1 × 3 matrix A below is a row
matrix and the 2 × 1 matrix B is a column matrix.
A5
3 1 
 5
B 
 2 
One may consider each row of a matrix as a row matrix and each column of it as a column
matrix. For the m × n matrix A above, the first row is
a11
a12
 a1n 
and the i-th row (for 1  i  m ) is
ai1
ai 2
 ain .
3  1
 5
 2

4
1

A
 4  5 2 


0 3
 6
first row
second row
third row
forth row
1-2 entry
3-2 entry
2-3 entry
Each of the operations A , B and C that we use in solving systems of linear equations by
the method of elimination corresponds to an operation on the rows of the augmented
matrix of the system.
More explicitly, the augmented matrix of the new system obtained by applying one of these
operations to a given system is obtained by applying a suitable operation to the rows of the
augmented matrix of the given system.
The operation A, interchanging two equations in the system, corresponds to interchanging
the corresponding rows of the augmented matrix;
The operation B, multiplying an equation in the system by a nonzero constant, corresponds
to multiplying the corresponding row of the augmented matrix by that nonzero constant;
The operation C, adding a constant multiple of one equation in the system to another
equation, corresponds to adding a constant multiple of one row of the augmented matrix to
another row.
From now on, multiplying a row by a number c will mean multiplying each entry of the row
by c, adding a row to another row of the same size will mean adding each entry of that row
to the corresponding entry of the other row.
Example. When [ 5 3 -1] is multiplied by 2, one obtains the row [10 6 -2]. If the same row
is first multiplied by 2 and then added to [ -3 1 4], one obtains the row [7 7 2 ] .
Now we consider the operations we applied in one of our previous examples and exhibit the
corresponding row operations on the augmented matrices.
 x  y  z  36

x  y  z  6
 x  2 y  z  3

:
1 36 
1 1
1 1  1 6 


1  2 1  3
 x  y  z  36

 
 2 z  30
  3 y  39

1
36 
1 1
0 0  2  30


0  3 0  39
 x  y  z  36

 
z  15

y  13

1 1 1 36
0 0 1 15 


0 1 0 13 
Augmented matrix
-1 times the first row is added to the
second row and also to the third row
The second row is multiplied by -1/2
and the third row by -1/3
x

 


8
z  15
y  13
1 0 0 8 
0 0 1 15


0 1 0 13
-1 times the second row and -1 times
the third row are added to the first row
x

 


8
y  13
z  15
1 0 0 8 
0 1 0 13


0 0 1 15
The second and the third rows
are interchanged
In solving a system of linear equations, would you prefer working on the rows of the
augmented matrix instead of the equations in the system? If your answer is “yes”, the next
lecture will show that you made a good choice.
When row operations of the above kind are applied to the augmented matrix of a given
system of linear equations, the matrix obtained is the augmented matrix of a system of
linear equations that is equivalent to the given one. For this reason, a natural way to solve a
system of linear aquations is to apply suitable row operations to the augmented matrix to
obtain a suitable augmented matrix so that the solution set of the corresponding system of
linear equations is easy to find. What we mean by suitable will be clarified in the
forthcoming lectures.