# The Game of Algebra or The Other Side of Arithmetic The Game of Algebra or The Other Side of Arithmetic © 2007 Herbert I. Gross by Herbert I. Gross & Richard.

## Presentation on theme: "The Game of Algebra or The Other Side of Arithmetic The Game of Algebra or The Other Side of Arithmetic © 2007 Herbert I. Gross by Herbert I. Gross & Richard."— Presentation transcript:

The Game of Algebra or The Other Side of Arithmetic The Game of Algebra or The Other Side of Arithmetic © 2007 Herbert I. Gross by Herbert I. Gross & Richard A. Medeiros next Lesson 18 Part 1

Arithmetic of Linear Functions Arithmetic of Linear Functions © 2007 Herbert I. Gross next

© 2007 Herbert I. Gross Since linear functions are so basic, it makes sense to introduce the arithmetic of functions in terms of the arithmetic of linear functions. Recall that in our introduction to sets (Lesson 17, Part 1), we mentioned that the study of algebraic structures extends beyond the realm of numbers. For example, the Game of Mathematics theme can be applied to the arithmetic of functions in which there are rules for combining two functions to form a third function. next

© 2007 Herbert I. Gross First, recall that linear functions can always be expressed in the mx + b form. next Now, we will see that there is more to linear functions than first seems to meet the eye.

© 2007 Herbert I. Gross For example, the sum of two linear functions is also a linear function. Let’s illustrate this with a specific example. Suppose f(x) = 3x + 4 and g(x) = 5x + 1. Then: f(x) + g(x) = (3x + 4) + (5x + 1) = (3x + 5x) + (4 + 1) = 8x + 5 So if we let h(x) = f(x) + g(x) we see that h(x) has the “mx + b” form, with m = 8 and b = 5. next The Sum of Two Linear Functions

next © 2007 Herbert I. Gross In summary, we have shown in this instance that if we define h to be the sum of f and g (that is, h = f + g), we see that the sum of the two linear functions is also a linear function. In the appendix at the end of this presentation we shall extend our demonstration to the more general case in which f(x) = m 1 x + b 1 and g(x) = m 2 x + b 2 next The Sum of Two Linear Functions

next © 2007 Herbert I. Gross While the sum of two linear functions is a linear function, we cannot say the same thing about the product of two linear functions. The Product of Two Linear Functions

next © 2007 Herbert I. Gross k(x) = (3x + 4)(5x + 1) k(x) = (3x + 4)5x + (3x + 4)1 k(x) = (15x 2 + 20x) + (3x + 4) k(x) = 15x 2 + 23x + 4 For example, let's revisit the linear functions f(x) = 3x + 4 and g(x) = 5x + 1. If we define k(x) to denote f(x) g(x), we see that… next

© 2007 Herbert I. Gross As the chart below proves… the rate of change of k(x) with respect to x (that is, the change of k(x) as x changes) is not constant. Therefore, k(x) is not linear. xx2x2 15x 2 23x15x 2 + 23x15x 2 + 23x + 4 change 0000041115233842246046106110 3913569204208 next 38 68 98

next © 2007 Herbert I. Gross In summary, we have just shown in this instance that if we define k to be the product of f and g (that is, k(x) = f(x) g(x) ), that the product of the two linear functions need not be a linear function. The Product of Two Linear Functions

The Composition of Two Functions So when we multiply two linear functions, the rate of change of the product is not the product of the rates of change of the two linear functions. This is quite different from what happens when we add two linear functions. Namely, when we add two linear functions, the rate of change of the sum is equal to the sum of the rates of change of the two linear functions. next © 2007 Herbert I. Gross

The Composition of Two Functions Nevertheless, there is an operation with two linear functions that yields a linear function in which we do multiply the rates of change of the two functions to obtain the rate of change of the new function. next © 2007 Herbert I. Gross The operation is based on the fact that the output of one function can be the input of another function.

The Composition of Two Functions As an example, consider the “program”… The command, “multiply by 3” can be denoted by the function f where f( ) = 3( ); and the command “add 2” by the function g where g( ) = ( ) + 2 next © 2007 Herbert I. Gross Pick a number; multiply by 3; then, add 2. Pick a number; multiply by 3; then, add 2. Notice that the number to which we added 2 is the number we obtained after we multiplied by 3. next

The Composition of Two Functions That is, we start with x, “run it through the f-machine” to obtain 3x as the output; and then “run” 3x through the g-machine. This is indicated below. next © 2007 Herbert I. Gross In the language of functions, we would write that the final output for a given value of x is g(f(x)). x f program “multiply by 3” f(x) = 3x g program “add 2” g(f(x)) = f(3x) = 3x + 2 g(f(x)) = f(3x) = 3x + 2 3x+2 f( ) = 3( ) and g( ) = ( ) + 2 next xx3x

next © 2007 Herbert I. Gross For example, suppose we buy boxes of candy for \$3 each and then pay a \$2 handling charge. To find the total cost of the candy, we first multiply the number of boxes by 3 and then add 2 The Composition of Two Functions In “real-life”, almost every computation is an example of composition of functions. next

© 2007 Herbert I. Gross Notes gof is not the same thing as fog. That is, in general f(g(x)) ≠ g(f(x); [and f(g(x)) is not the same as f(x) g(x)]. For example, it makes a difference whether we say “Pick a number multiply it by 3 and then add 2” (that is, 3x + 2); or whether we say “Pick a number add 2 and then multiply it by 3” (that is, 3(x + 2)). next

© 2007 Herbert I. Gross As another example, let f and g be defined by f(x) = 2x and g(x) = x 2. Then… f(3) = 2(3) = 6 and g(f(3)) = g(6) = 6 2 = 36 f(3) g(3) = 6 × 9 = 54 next g(3) = 3 2 = 9 and f(g(3)) = f(9) = 2(9) = 18 next Hence… g(f(3)) ≠ f(g(3)) and f(g(3)) ≠ f(3) g(3) next

© 2007 Herbert I. Gross However, if f(x) and g(x) are both linear functions in x the rates of change (with respect to x) of f(g(x)) and of g(f(x)) are equal to the product of the rate of change of f(x) with respect to x and the rate of change of g(x) with respect to x. Notes

next © 2007 Herbert I. Gross In this case, the rate of change of f(x) with respect to x is 3, and the rate of change of g(x) with respect to x is 5. The product of the two rates of change is 15, and we will now show that the rate of change of f(g(x)) and g(f(x)) with respect to x is also 15. Let’s illustrate this with a specific example. Suppose once again that we deal with… f(x) = 3x + 4 and g(x) = 5x + 1. next Notes

next © 2007 Herbert I. Gross Recall that f(x) = 3x + 4 can be written as… f( ) = 3( ) + 4 next and g(x) = 5x + 1 can be written as… g( ) = 5( ) + 1

next © 2007 Herbert I. Gross Therefore… f( ) = f( ) = 3( ) + 4 More generally… we will show in the appendix that if f(x) = m 1 x + b 1 and g(x) = m 2 x + b 2, then the rate of change of f(g(x)) and g(f(x)) with respect to x is m 1 m 2. next g( ) = g( ) = 5( ) + 1 next = (15x + 20) + 1 = 15x + 21 = (15x + 3) + 4 = 15x + 7 g(x) 5x + 1 f(x) 3x + 4 next

© 2007 Herbert I. Gross If the previous models seem a bit abstract to you, perhaps viewing the functions as “programs” will help. Plain English Model To this end let’s rewrite f(x) = 3x + 4 as the program… f - program InputxMultiply by 33x3xAdd 43x + 4Outputf(x) = 3x + 4 next

© 2007 Herbert I. Gross In a similar way let’s rewrite g(x) = 5x + 1 as the program… Plain English Model f - program Inputx Multiply by 33x3x Add 43x + 4 Outputf(x) = 3x + 4 g - program InputxMultiply by 55x5xAdd 15x + 1Outputg(x) = 5x + 1

next © 2007 Herbert I. Gross In this way we see that… Plain English Model gof - program Input of f programxMultiply by 33xAdd 43x + 4Output of f programf(x) = 3x + 4Input of g programf(x) = 3x + 4Multiply by 55(3x + 4)Add 1(15x + 20) + 1Outputg(f(x)) = 15x + 21 = 15x + 20 = 15x + 21

next © 2007 Herbert I. Gross And we see that… Plain English Model fog - program Input of g programxMultiply by 55xAdd 15x + 1Output g programg(x) = 5x + 1Input of f programg(x) = 5x + 1Multiply by 33(5x + 1)Add 4(15x + 3) + 4Output of f programf(g(x)) = 15x + 7 = 15x + 3 = 15x + 7

next © 2007 Herbert I. Gross The fact that the composition of two linear functions is also a linear function validates our earlier conclusion that any sequence of steps in our “plain English” model that has the form “add (or subtract) a constant”; “subtract from a constant”; “multiply (or divide) by a constant”; and/or, “add (or subtract) the input” will always generate a linear function. Note

© 2007 Herbert I. Gross For example… Program Step 1Pick a number.x Step 2Add 3.x + 3 Step 3Multiply by 4.4(x + 3) Step 4Subtract 8.(4x + 12) – 8 Step 5Divide by 2.(4x + 4) ÷ 2 Step 6Add the input.(2x + 2) + x Step 7 Subtract the result in Step 6 from 11. 11 – (3x + 2) = 11 + - 1(3x + 2) = 11 + - 3x + - 2 = 9 + - 3x Step 8Multiply by - 1. - 1( - 3x + 9) Step 9Add 20.(3x + - 9) + 20 Step 10Write the answer. 4x + 12 4x + 4 2x + 2 3x + 2 - 3x + 9 3x + - 9 3x + 11 next

© 2007 Herbert I. Gross Since every linear function can (through paraphrasing) ultimately be written in the “mx + b” form, it is easy to “undo” it. Namely, to “undo” mx + b we first subtract b and then divide by m (this is possible except in the special case in which m = 0). So, for example, to undo the given program, we start with the result in Step 10 (3x + 11), subtract 11 to obtain 3x, and we then divide by 3 to obtain x. The Inverse (Undoing) of a Linear Function

next © 2007 Herbert I. Gross In the language of functions, Steps 1 through 10 can be summarized in the form… The Inverse of a Linear Function f(x) = 11 – ({[4(x + 3) – 8] ÷ 2} + x) + 20 f(x) can be “undone”’ by subtracting 11 and dividing by 3. In the language of functions, the undoing operation is represented by the function g where… g(x) = (x – 11) ÷ 3 = 1 / 3 (x – 11) next

© 2007 Herbert I. Gross In other words g(f(x)) = x. That is… Program Step 1Pick a number.x Step 2Add 3.x + 3 Step 3Multiply by 4.4(x + 3) Step 4Subtract 8.(4x + 12) – 8 Step 5Divide by 2.(4x + 4) ÷ 2 Step 6Add the input.(2x + 2) + x Step 7 Subtract the result in Step 6 from 11. 11 – (3x + 4) = 11 + - 1(3x + 4) = 11 + - 3x + - 2 = 9 + - 3x Step 8Multiply by - 1. - 1( - 3x + 9) Step 9Add 20.(3x + - 9) + 20 Step 10Write the answer. 4x + 12 4x + 4 2x + 2 3x + 2 - 3x + 9 3x + - 9 3x + 11 next Step 11 Subtract 11. 3x 3x Step 12 Divide by 3. x Step 13 Write the answer x x

next © 2007 Herbert I. Gross There is a tendency to believe that in order to “undo a recipe”, we have to start with the output and reverse our steps one-by-one until we arrive at the input. However, as we have just shown in the previous example, a function can have an inverse even if some of the steps, as written, cannot be “undone”. Reminder

next © 2007 Herbert I. Gross To clarify this situation: there is a more formal way, using the composition of functions, to define the inverse of a function. next Given a function f, suppose there exists a function g such that g(f(x)) = x for every x in the domain of f. In that case we call g the inverse of f and usually denote it by f -1. Definition The Inverse Function in Terms of Composition of Functions

next © 2007 Herbert I. Gross Translating the above diagram into function notation we see that if f(x) = 3x + 4… f -1 (3x + 4) = [(3x + 4) – 4] ÷ 3 = x. In terms of the input/output machine, we have… × 3 input 3x + 4 output 3x + 4 ÷ 3 output 3x – 4 – 4 input 3x + 4x x next

© 2007 Herbert I. Gross Do not confuse f -1 (x) with. Note 1 f(x) For example, if f(x) = 3x + 4 then… 1 f(x) 1 3x + 4 = next While the notation f -1 (x) may seem threatening at first, remember that it’s just an abbreviation for indicating that we know the output and want to find the input.

© 2007 Herbert I. Gross For example, suppose we are given Program 1, which in the language of functions is… f(x) = 11 – ({[4(x + 3) – 8] ÷ 2} + x) + 20 and we are given the instruction… “Compute the value of x when f(x) = 71” we could abbreviate it by asking instead… “Compute f-1(71) next

© 2007 Herbert I. Gross We have already seen that in this case the inverse of f was given by… f -1 (x) = (x – 11) ÷ 3 So to obtain the answer to our question, we need only replace x by 71 in the above equation to obtain… next = 20 = 60 ÷ 3f -1 (71) = (71 – 11) ÷ 3

next © 2007 Herbert I. Gross In terms of the input/output machine, we have… ×3×3×3×3 input 3x +11 output 3x + 11 ÷3÷3÷3÷3 output 60 – 11 – 11 input 7120 x next

© 2007 Herbert I. Gross To check our answer we replace x by 20 in Step 1 and see that… Program Step 1Pick a number.x Step 2Add 3.x + 3 Step 3Multiply by 4.4(x + 3) Step 4Subtract 8.(4x + 12) – 8 Step 5Divide by 2.(4x + 4) ÷ 2 Step 6Add the input.(2x + 2) + x Step 7 Subtract the result in Step 6 from 11. 11 – (3x + 4) = 11 + - 1(3x + 4) = 11 + - 3x + - 2 = 9 + - 3x Step 8Multiply by - 1. - 1( - 3x + 9) Step 9Add 20.(3x + - 9) + 20 Step 10Write the answer. 92 84 42 62 - 51 51 71 next 20 23

next © 2007 Herbert I. Gross This example shows that the inverse function may exist even if not all of the steps are “undoable”. For example, if we try to undo the steps in the above example, we are at an impasse when we want to undo Step 6 (add the input) because at this stage we don't know what the input is. next

© 2007 Herbert I. Gross Suppose you travel from Town A to Town B. The inverse of this would be to return to Town A from Town B. One way would be to retrace your steps (that is, by “undoing” the previous steps). However, there may be a detour on the return trip, but you may still be able to return to Town A by a different route. next Non-mathematical Illustration A B f(x)f -1 (x) next

© 2007 Herbert I. Gross For now this completes our discussion of linear functions. We will talk more about inverse functions in Lesson 20.

next © 2007 Herbert I. Gross Appendix Part 1 h(x) = (m 1 x + b 1 ) + (m 2 x + b 2 ) next Suppose f(x) = m 1 x + b 1 and g(x) = m 2 x + b 2. Define h by h(x) = (m 1 x + b 1 ) + (m 2 x + b 2 ). Then … h(x) = (m 1 x + m 2 x) + (b 1 + b 2 ) h(x) = (m 1 + m 2 )x + (b 1 + b 2 ) To show that the sum of linear functions is linear.

next © 2007 Herbert I. Gross That is, h(x) also has the “mx + b” form with m = m 1 + m 2 and b = b 1 + b 2. next (Also note the closure property here. Namely since m 1 and m 2 are numbers, so also is m 1 + m 2 ; and since b 1 and b 2 are numbers, so also is b 1 + b 2.) In summary: if we define h to be the sum of f and g (that is, h = f + g), we have shown that the sum of two linear functions is also a linear function. Definition D

next © 2007 Herbert I. Gross Suppose f(x) = m 1 x + b 1 and g(x) = m 2 x + b 2. We may rewrite this more generally as… f( ) = m 1 ( ) + b 1 and g( ) = m 2 ( ) + b 2 …we see that… next f(g(x)) = f(m 2 x + b 2 ) = m 1 ( ) + b 1 = m 1 m 2 x + m 1 b 2 + b 1 = m 3 x + b 3 …where = m 3 = m 1 m 2 and b 3 = m 1 b 2 + b 1 next More on the composition of linear functions Appendix Part 2 m 2 x + b 2

next © 2007 Herbert I. Gross and we see that… next g(f(x)) = g(m 1 x + b 1 ) = m 2 ( ) + b 2 = m 2 m 1 x + m 2 b 1 + b 2 = m 4 x + b 4 …where m 4 = m 2 m 1 and b 4 = m 2 b 1 + b 2 next Comparing m 3 x + b 3 and m 4 x + b 4, we see that … m 3 = m 4 = m 1 m 2, but b 3 ≠ b 4 m 1 x + b 1

Download ppt "The Game of Algebra or The Other Side of Arithmetic The Game of Algebra or The Other Side of Arithmetic © 2007 Herbert I. Gross by Herbert I. Gross & Richard."

Similar presentations