|
There
are times when various quantities can be related to one another. If
this relationship follows a regular pattern then we can assign
variables to these quantities and write a mathematical equation to
express this relationship. This relationship is called a function.
If this relationship does not follow a regular pattern, we can
still assign variables to these quantities, but we cannot write an
equation to express this relationship.
Suppose
we talk about the squaring relationship, i.e., 1 squared is
1, 2
squared is 4, 3 squared is 9, etc. We can show this relationship
using set notation like this: { . . ., (1,1), (2,4), (3,9), . . .}.
1 is related to 1, 2 is related to 4, 3 is related to 9, etc. The
ellipsis on either side indicates the pattern repeats indefinitely to
the right and to the left. This is a regular pattern and we can
therefore write an equation like this: let 'x' represent the first
number and 'y' represent the second number then we have y = x2.
If we're not too concerned naming the second number, y, we may
employ functional notation. We only need a name for the function,
so let's call the function 'f'. The equation becomes f(x) = x2.
And we read this equation as “f of x equals x squared.”
Function
names are not limited to single letters, but single letters are used
for brevity. We could write square(x) = x2, and this
would be quite alright, and we'd be talking about the square
function.
For
an explanation of independent and dependent variables and domains and
ranges and maps and graphs
see
: http://www.k12math.com/math-concepts/graphs.htm
Substituting
into a function refers to taking the value for the independent
variable and replacing all terms named by the variable with that
value then simplifying the result. This result will be the value of
the dependent variable.
Example:
f(x) = 2·x – x2 + 13
for
x = 1 f(1) = 2·1 – 12 + 13 = 14
for
x = 0 f(0) = 2·0 – 02 + 13 = 15
for
x = -2 f(-2) = 2(-2) – (-2)2 + 13 = -4 –
(4) + 13 = 5
We
can also ask: if f(x) = -2, what are the values of x?
So,
we have -2 = 2x – x2 + 13
0 = 2x –
x2 + 15
0 = (x + 3) ( -x + 5 )
The
solution is x = -3 or x = 5 x ε { -3, 5 }
(Remember,
quadratic equations have 2 solutions.)
Functions
can be described by the way they map the independent variables to the
dependent variables. In the previous example we have two values of x
that produce the same value of y, namely -3 and 5 map to -2. In this
case we say that this function, f, is a many-to-one mapping.
Suppose we have the function g(x) = x½. For x = 4
the square root of 4 is +2 and -2. In this case one value for x
gives two values for y. This function, g, is a one-to-many
mapping. Now suppose we have h(x) = 2x. In this case for every
value of x is is a unique value for y. This function, h, is a
one-to-one mapping. It is possible to have functions that
are many-to-many mappings, but many of these functions cannot
be described by an equation, but are usually described with
conditional set notation relating the dependent variable to the
independent variable(s).
Functions
can be combined arithmetically (as long as domain constraints are
named as necessary.) For example:
suppose
f(x) = 3x + 2 and g(x) = x – 10
where the Domain and
Range = Real Numbers
f(x)
+ g(x) = (3x + 2) + (x – 10) = 4x – 8
f(x)
– g(x) = (3x + 2) – (x – 10) = 2x + 12
f(x)
· g(x) = (3x + 2) · (x – 10) = 3x2
– 28x – 20
f(x)
/ g(x) = (3x + 2)/(x – 10)
In
#4 above, notice that if x = 10 we'd be dividing by 0, so our domain
constraint would be x ≠ 10.
One
last operation we'll perform with functions is called composition of
functions. This operation is akin to substituting values for the
independent variable into a function, instead we substitute another
function as an independent variable value into that first variable's
function. An example will help.
Using
our previous functions f and g, let's substitute g into f. We get:
f( g(x) ) = 3( g(x) ) +
2
f( g(x) ) = 3( x –
10 ) + 2
f( g(x) ) = 3x –
28
f º g = 3x –
28
note
the last equation, “f of g of x” is notated as f º
g
let's
do another:
g
º f = ( f(x) ) – 10
=
(3x + 2 ) – 10
=
3x – 8
|