Download linear equation

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

List of important publications in mathematics wikipedia , lookup

Line (geometry) wikipedia , lookup

Algebra wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Elementary algebra wikipedia , lookup

Recurrence relation wikipedia , lookup

History of algebra wikipedia , lookup

System of polynomial equations wikipedia , lookup

Partial differential equation wikipedia , lookup

System of linear equations wikipedia , lookup

Transcript
Solving Linear Equations
Polynomials of Degree 0 and 1
If f(x) is a polynomial in the variable x
with coefficients in the set A and f(x)
has degree 0 then f is an element of A.
f( x )a0 x
0
Since the coefficients are in A,
f(x) = a01 = a0
Next time: Polynomials of degree 1
a0is in A. Since anything to the 0 power is 1
Polynomials of Degree 1
A linear polynomial is one which is the zero polynomial or is of degree at most
1 in each of its variables
l( x, y, x, w )a xb yc zd w
L 2 x3 is linear in its one variable, x.
1
L 2 x5 y13 is linear in x and y.
2
A polynomial that is not linear may be linear in some of its variables.
2
L 7 x4 y 3 x y
3
( 73 y ) x4 y
2
is linear a polynomial in x.
Recall that the degree of a polynomial is determined by its standard form
2
2
2
2
( x1 ) ( y2 ) 4( x3 ) ( y4 ) 4 x244 y
Linear Equations
A linear equation is an expression of the form L = M where L and M are linear
equations. (Recall that 0 is a linear equation)
Examples:
3 x4 y15 x3z
2 x4 y5z0
12
The simplest linear equation is of the form ax = b. For example
3 x12
Tuples of Numbers
Tuples:
If n is a positive integer then a n-tuple of numbers is an ordered list of n numbers.
N-tuples are often written in the form ( a , a , ..., a ).
1 2
n
A 1-tuple is just a number (a)
A 2-tuple is pair of numbers (a, b)
A 3-tuple is something of the form (a,b,c)
Etc.
(7) is a 1-tuple. It is conventional to drop the parentheses and think of (7) as
being identical with 7.
(2,3) is a 2-tuple. Also called an ordered pair or just a “pair” of numbers.
(5,-2,7) is a 3-tuple. Also called an ordered triple or just “triple” of numbers.
IMPORTANT: Order is important. (2,3) and (3,2) are different ordered pairs,
(1,2,3) and (1,3,2) are different 3-tuples.
Solutions to Linear Equations
If L is a linear equation in the variables x1, x2, ..., xn a solution to L is an
n-tuple of numbers ( a , a , ..., a ) such that if ai is substituted for x
1 2
n
i
in L for each i then the result is an equality of numbers.
Examples:
(2,-1) is a solution to
2 x3 y7 since 2(2) -3(-1) =7
(2,1) is not a solution to this equation since 2(2)-3(1) = 7 is not true.
(0,0,0) is a solution to 3 x + 5 y – z = 0 but (0,0,1) is not
(4,-1,3) is a solution to x + y + z = 6 but (0,0,0) is not
A set of linear equations is called a system of linear equations.
A solution to a system of linear equations is a tuple that is a solution to each member
of the system
Example:
{ 2x -3y - 5 = 0, x+y = 0 } is a system of linear equations.
(1,-1) is a solution to the system.
(2,-2) is not a solution to the system since it is not a solution to both members
of the system
Solving Linear Equations
The simplest Case
To solve a linear equation is to describe all solutions to the equation.
The simplest linear equation in the variable x is ax + b = 0
Case 1: a = 0
If a = 0 then this is the equation 0 x+ b = 0. Regardless of the value of x this
becomes b=0 which is true only if b=0. So if a = 0 and b = 0 every number (1tuple) is a solution while if b is not 0 there are no solutions.
Case 2: a not 0
If a is not zero then –b/a is a number. If we substitute it for x in ax=b
we get a(-b/a) + b = 0 or 0 = 0 which is true. So –b/a is a solution.
Conversely if u is a solution then au + b = 0 is an equality of numbers so au = b or u = -b/a. This says that –b/a is the only solution.
Example: Solve 3x -7 = 0.
solution: 3x = 7, x = 7/3
Solving Single Linear Equations in
more than one variable
A linear equation in any number of variables can be thought of as an equation in any
one of the variables.
Example: Solve 3x + 5y -2w = 0
Think of this as 3x + b = 0 where b = 5y-2w
5 y2 w


x
Then by the case for one variable all solutions x are
3
This is true regardless of the values of y and w so solutions are the tuples
(

5y
3

2w
3
, y, w
) where y and w can be any numbers. This says there are
infinitely many solutions.
There is no requirement that we choose x to be the “distinguished” variable. We can just
as easily choose y. Then the equation is viewed as
3x 2w
3x 2w


x
,
,w )
5y +(3x-2w)=0 so y
and the solutions are (

5
5
5
5
Alternative Form of Solutions
3x 2w
The expression of the solution (x,y,w) as ( x, 
, w) can also be

5
5
written as:
x =x
y= 
w=w
3x
5

2w
5
Solving Linear Equations
The fundamental idea in solving systems of
linear equations is to modify the equations
by a sequence of steps such that:
• After each step the new equations have
exactly the same solutions
• When the modifications are complete the
solutions can be read directly from the
terminal (set of) equations.
Steps which do not change the
solutions of (sets of) linear equations
• The same quantity may be added to both sides
of an equation
• An equation may be multiplied by a non-zero
number
• Any multiple of an equation may be added to a
different equation
• Any one equation may be solved for one of the
variables and the result substituted for that
variable in any of the other equations
* The first and fourth of the above can be inferred from the second and third
Examples: Solving by Substitution
2x – y = 3
4x +5y = 2
Use the first equation to solve for y:
y = 2x-3
Substitute for y in the second: 4x + 5(2x-3) = 2
or 14x = 17
The result is a linear equation in one variable, x. Solve it for x:
so, x = 17/14
The solution to the first equation expresses y in terms of x so substitute the value for x
into it to get y. y = 2(17/14) – 3 = -4/7 so the solution is (17/14, -4/7) which may
also be expressed as x = -17/14, y = -4/7
Example: Solving by Reduction
(also called elimination)
For more than a few equations reduction/elimination is preferable to substitution
because it is more systematic
2x – y = 3
4x +5y = 2
add -2(equation 1) to equation 2
4x + 5y =2
-4x +2y = -6
----------------7y = -4
New system
2x - y = 3
7y = -4
Solve last equation for y, y = -4/7, substitute y-value in first 2x – (-4/7) = 3 , x = 17/14
Note What Has Happened
The problem of solving two equations in two unknowns
2x – y = 3
4x +5y = 2
Is replaced by two problems of solving one equation in one
unknown
2x - y = 3
7y = -4
2x – (-4/7) = 3
y = -4/7
x
= 17/14
y = -4/7
We knew how to solve problems
of one equation in one variable.
We then took a problem of
solving two equations in two
variables and replaced it by
problems of the type we knew how
to do.
Works for Any Number of Equations
Eq1:
Eq1:
Eq2:
Eq3:
2x - 6y - z = 0
4x – y + 3z = 5
2x - 3y + z = 2
2x - 6y – z = 0
11y + 5z = 5
3y + 2z = 2
2x - 6y
- z= 0
y + (5/11)z = 5/11
3y +
2z = 2
2x - 6y
- z= 0
y + (5/11)z = 5/11
(6/11)z = 6/11
2x - 6y
- 1= 0
y + (5/11) 1 = (5/11)
z =1
2x - 6y - z = 0
Eq2: 4x - y + 3z = 5
- 2Eq1: -4x + 12y + 2z = 0
Eq3: 2x - 3y + z = 2
-Eq1: -2x + 6y + z = 0
2x - 6y
- z= 0
y + (5/11)z = 5/11
3y +
2 z= 2
(-3)y + (-3)(5/11)z = -(3)(15/11)
2x - 6y
- z= 0
y + (5/11) z = 5/11
z =1
2x - 6y - 1 = 0
y
=0
z =1
2x – 6 0 - 1 = 0
y
=0
z =1
Consistency and Inconsistency
The method of reduction is systematic and will end in
the solution to a system of linear equations or a demonstration
that they are inconsistent
3x = 3
3x = 3
6x = 1
6x = 1
-6x = -6
3x + 4y = 3
3x + 4y = 3
6x + 8y = 1
6x + 8y = 1
-6x - 8y = -6
3x = 3
0 = -5
These systems are
inconsistent since the last
equation in each has no
solutions. So there can be no
solutions to each member of
the system
3x + 4y = 3
0 = -5
If the system is inconsistent reduction will
always produce an equation of form
“ 0 = C” where C is not zero
Systems with more variables than
unknowns
x+y=1
x = 1-y
If y is any number whatsoever then
(1-y,y) is a solution. Moreover this is all
solutions. This can also be written as
x = 1-y
y=y
x+2y -3z = 7
x = 7 -2y +3z
If y and z are is any numbers whatsoever
then (7- 2y-3z,y,z ) is a solution.
Moreover this is all solutions.
This can also be written as
x = 7-2y-3z
y=y
z= z
Number of equations may drop
2x – 3y = 5
2x – 3y = 5
-8x +12y = -20
2x – 3y = 5
0=0
-8x +12y = -20
8x –12y = 20
2x – 3y = 5
x = (3/2)y +5/2
Solution: x = (3/2)y + 5/2
y =y
or { ( (3/2)y + 5/2, y ), y any
number
2x – 3y = 5
4x + y = 7
6x - 9y = 15
-8x +12y = -22
2x – 3y
7y
0
0
=5
= -3
=0
= -2
2x – 3y = 5
7y = -3
0 = -2
Inconsistent
Cramer’s Rule
Cramer’s rule is a method for solving systems of n linear equations in n unknowns
when there is only one solution. It relies on a calculation procedure called the
determinant which is a number associated with square arrays of numbers. Here
we discuss only the 2 by 2 case.
If
a
M
c
b

d
then the determinant of M (denoted det(M)) is ad-bc
Cramer’s rule says that if
ax + by = f
cx + dy = g is a “2 by 2” system of linear equations then there is one solution:
x
 f
det 
 g
b 
 
d 
 a
det 
 c
b 
 
d 
y
 a
det 
 c
f 
 
g 
 a
det 
 c
b 
 
d 
Provided det(M) is not zero. If det(M) = 0 then the system either has no
solutions or it has an infinite number of solutions.
Cramer’s Rule Example
Use Cramer’s rule to solve
{ 2 xy3, 4 x5 y2 }
2x –y = 3
4x+5y = 2
(2)(5) –(4)(-1) = 14 so there is one solution given by
x
 3
det 
 2
1  
 
5 
 2
det 
 4
1  
 
5 
y
 2
det 
 4
3 
 
2 
 2
det 
 4
1  
 
5 
x = (3*5 – 2*(-1))/14 = 17/14
y = ((2)(2)-(4)(3))/14 = -8/14 = -4/7
Geometric Significance of the
Determinant
The area of the triangle with vertices
(0,0), (a,b), and (c,d) is:
 a

+/- 2 det 
 c
1
b 
 
d 
The area of the triangle with vertices (0,0),
(3,0), and (3,4) is ½ ( (3)(4)-(3)(0)) = 12/2 = 6
Cramer’s Rule Doesn’t Always Work
Cramer’s rule won’t always work since the determinant could be 0. This
happens in two cases:
1. The system is inconsistent
2. The system is redundant but can be solved by other means (e.g.
reduction which will reduce the number of equations to less than
the number of variables.
(1)
2x+3y = 7
4x+6y = 14
 2

 4
det (
3


6
) = 2(6)-4(3) = 0
Cramer’s rule won’t work. System is redundant but consistent with solution
x = 7/2 – (3/2)y, y = y
(2)
2x+3y = 7
4x+6y = 13
det
 2
( 
 4
3


6
) = 2(6)-4(3) = 0
Cramer’s rule won’t work and system is inconsistent