solving linear equations. polynomials of degree 0 and 1 if f(x) is a polynomial in the variable x...

22
Solving Linear Equations

Upload: albert-williamson

Post on 13-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 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

Solving Linear Equations

Page 2: 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

Polynomials of Degree 0 and 1If 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 x0

Since the coefficients are in A, is in A. Since anything to the 0 power is 1f(x) = 1 =

a0

a0 a0

Next time: Polynomials of degree 1

Page 3: 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

Polynomials of Degree 1

( )l , , ,x y x w a x b y c z d w

A linear polynomial is one which is the zero polynomial or is of degree at most1 in each of its variables

L1

2 x 3 is linear in its one variable, x.

L2

2 x 5 y 13 is linear in x and y.

A polynomial that is not linear may be linear in some of its variables.

is linear a polynomial in x. ( )7 3 y x 4 y2L3

7 x 4 y2 3 x y

Recall that the degree of a polynomial is determined by its standard form

( )x 1 2 ( )y 2 2 4 ( )x 3 2 ( )y 4 2 4 x 24 4 y

Page 4: 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

Linear EquationsA linear equation is an expression of the form L = M where L and M are linearequations. (Recall that 0 is a linear equation) Examples:

3 x 4 y 1 5 x 3 z 2 x 4 y 5 z 0

The simplest linear equation is of the form ax = b. For example

1 2

3 x 12

Page 5: 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

Tuples of NumbersTuples:

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 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.

, , ,a1

a2

... an

(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.

Page 6: 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

Solutions to Linear EquationsIf L is a linear equation in the variables a solution to L is an n-tuple of numbers ( ) such that if is substituted for in L for each i then the result is an equality of numbers.

, , ,x1

x2

... xn

, , ,a1

a2

... an

ai x

i

Examples:2 x 3 y 7(2,-1) is a solution to 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 memberof the systemExample:{ 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

Page 7: 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

Solving Linear EquationsThe 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 = 0If 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 (1-tuple) is a solution while if b is not 0 there are no solutions.

Case 2: a not 0If a is not zero then –b/a is a number. If we substitute it for x in ax=bwe 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

Page 8: 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

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 anyone of the variables.Example: Solve 3x + 5y -2w = 0 Think of this as 3x + b = 0 where b = 5y-2w Then by the case for one variable all solutions x are x

5 y 2 w

3

This is true regardless of the values of y and w so solutions are the tuples

( ) 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

5y +(3x-2w)=0 so and the solutions are ( )

, , 5 y

3

2 w

3y w

y 3 x

5

2 w

5, ,x 3 x

5

2 w

5w

Page 9: 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

Alternative Form of SolutionsThe expression of the solution (x,y,w) as ( x, , w) can also be written as:

x = x

y =

w = w

3 x

5

2 w

5

3 x

5

2 w

5

Page 10: 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

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.

Page 11: 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

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

Page 12: 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

Examples: Solving by Substitution

2x – y = 34x +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

Page 13: 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

Example: Solving by Reduction(also called elimination)

2x – y = 34x +5y = 2

For more than a few equations reduction/elimination is preferable to substitution because it is more systematic

add -2(equation 1) to equation 24x + 5y =2-4x +2y = -6----------------- 7y = -4

New system2x - y = 3 7y = -4

Solve last equation for y, y = -4/7, substitute y-value in first 2x – (-4/7) = 3 , x = 17/14

Page 14: 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

Note What Has Happened

2x – y = 34x +5y = 2

The problem of solving two equations in two unknowns

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.

Page 15: 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

Works for Any Number of Equations

Eq1: 2x - 6y - z = 0Eq2: 4x – y + 3z = 5Eq3: 2x - 3y + z = 2

Eq1: 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 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

3y + 2 z = 2 (-3)y + (-3)(5/11)z = -(3)(15/11)

2x - 6y - z = 0 y + (5/11)z = 5/11 (6/11)z = 6/11

2x - 6y - z = 0 y + (5/11) z = 5/11 z =1

2x - 6y - 1 = 0 y + (5/11) 1 = (5/11) z =1

2x - 6y - 1 = 0 y = 0 z =1

2x – 6 0 - 1 = 0 y = 0 z = 1

Page 16: 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

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 = 36x = 1

3x = 3

6x = 1-6x = -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 = 36x + 8y = 1

3x + 4y = 3

6x + 8y = 1-6x - 8y = -6

3x + 4y = 3 0 = -5

If the system is inconsistent reduction willalways produce an equation of form “ 0 = C” where C is not zero

Page 17: 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

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 allsolutions. This can also be written as

x = 1-yy = 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-3zy = yz= z

Page 18: 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

Number of equations may drop

2x – 3y = 5 -8x +12y = -20

2x – 3y = 5

-8x +12y = -20 8x –12y = 20

2x – 3y = 5 0 = 0

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 = 5 7y = -3 0 = 0 0 = -2

2x – 3y = 5 7y = -3 0 = -2

Inconsistent

Page 19: 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

Cramer’s RuleCramer’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 then the determinant of M (denoted det(M)) is ad-bc

Cramer’s rule says that ifax + by = fcx + dy = g is a “2 by 2” system of linear equations then there is one solution:

M

a b

c d

x

det

f b

g d

det

a b

c d

y

det

a f

c g

det

a b

c 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.

Page 20: 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

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

y

det

2 3

4 2

det

2 1

4 5

x

det

3 1

2 5

det

2 1

4 5

(2)(5) –(4)(-1) = 14 so there is one solution given by

x = (3*5 – 2*(-1))/14 = 17/14 y = ((2)(2)-(4)(3))/14 = -8/14 = -4/7

Page 21: 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

Geometric Significance of the Determinant

The area of the triangle with vertices(0,0), (a,b), and (c,d) is:

det

a b

c d+/-

The area of the triangle with vertices (0,0),(3,0), and (3,4) is ½ ( (3)(4)-(3)(0)) = 12/2 = 6

1

2

Page 22: 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

Cramer’s Rule Doesn’t Always WorkCramer’s rule won’t always work since the determinant could be 0. Thishappens 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.

2x+3y = 74x+6y = 14

2 3

4 6det ( ) = 2(6)-4(3) = 0

Cramer’s rule won’t work. System is redundant but consistent with solutionx = 7/2 – (3/2)y, y = y

2x+3y = 74x+6y = 13

det ( ) = 2(6)-4(3) = 0

2 3

4 6

Cramer’s rule won’t work and system is inconsistent

(1)

(2)