Algebra/Function Graphing

From Wikibooks, open books for an open world
Jump to: navigation, search
Algebra
Algebra
 ← Functions Function Graphing Systems of Equations → 

Functions have an Independent Variable and a Dependent Variable[edit]

When we look at a function such as  f(x) = \frac {1}{2}x,  we call the variable that we are changing--in this case  x\, --the independent variable. We assign the value of the function to a variable we call the dependent variable. The reason that we say that  x\,  is independent is because we can pick any value for which the function is defined--in this case real  \mathbb{R}  is implied--as an input into the function. Once we pick the value of the independent variable the same result will always come out of the function. We say the result is assigned to the dependent variable, since it depends on what value we placed into the function.

Equating  y\,  with our function  y = \frac {1}{2}x,  then   2y = 2(\frac {1}{2}x),  then   2y = x,\,  then   g(y)= 2y.\,

The independent variable is now  y\,  and the dependent variable  x.\,

  • Note: this is a very unusual case where the ordered pair  (g(y),y)\,  is reverse mapped  y\mapsto x\,  and corresponding reverses (dependent, independent), (range, domain), and now  x\,  must be singular for each and every  y\,  corresponding to an horizontal line test of function! It would be less desireable to rotate or swap the positions of axes, the order of coordinate pairs  (x,y)\,  and (abscissa, ordinate).

Have we used Algebra to change the nature of the function? Let's look at the results for three functions

  f(x) = \frac{1}{2}x     g(y) = 2y\,     h(x)=2x\,  
  x\,   f(x)\,  
    2\,     1\,
    0\,     0\,
  -2\,     -1\,
  y\,   g(y)\,  
    1\,     2\,
    0\,     0\,
  -1\,     -2\,
  x\,     h(x)\,  
    1\,     2\,
    0\,     0\,
  -1\,     -2\,

If we look at the table above we can see that the independent variable for  f(x)\,  gives the same results as the dependent variable of  g(y).\,  We can see what this means when we look at the values for  h(x).\,  The function  g(y)\,  is the same as the function  f(x),\,  but when we switch which variable we use as the independent variable between  g(y)\,  and  h(x)\,  we see that we have discovered that  g(y)\,  and  h(x)\,  are inverse functions.

Let's take a look at how we can draw functions in   x\,  and   y\,  and then come back and look at this idea of independent and dependent variables again.

Explicit and Implicit Functions[edit]

Variables like  x\,  and  y\,  formulate a 'relation' using simple algebra.  f,\,   g,\,  and   h\,  commonly denote functions. Function notation  f(x),\,  read "eff of ex", denotes a function with 'explicit' dependence on the independent variable  x.\,  By assigning variable  y\,  to  f(x),\,   y=f(x),\,    y\,  is now an 'implicit' function of   x\,  using equation notation. If  f(x) \,  is  \frac{x}{2},  then  y=\frac{x}{2}   [ y(x)\,  would denote an 'explicit' function of  x\, ]. A relation is also a function when the dependent variable has one and only one value for each and every independent variable value.

The Cartesian Coordinate System[edit]

The Cartesian Coordinate System is a uniform retangular grid used for plane graph plots. It's named after pioneer of analytic geometry, 17th century French mathematician René Descartes, whom's Latinized name was Renatus Cartesius. Recall that each point has a unique location, different from every other point. We know that a line is a collection of points. If we pick a direction of travel for the line that starts at a point then all of the other points can be thought of as either behind our starting point or ahead of it. Finally, a plane can be thought of as a collection of lines that are parallel to each other. We can draw another line that is composed of one point from each of the lines that we chose to fill our plane. If we do this then we can locate the other lines as behind or ahead of the line with the point we chose to start on. Descartes decided to pick a line and call it the   x\, -axis, and to then pick a line perpendicular to this line and call it the   y\, -axis. He then labeled this intersection point   (0,0)\,  and origin O. The points to the left (or behind) of this point each represent a negative number that we label as  (-x,0).\,  The points to the right (or ahead) of this point each represent a positive number that we label as   (x,0).\,  The points on the   y\, -axis that are above   0,0\,  are labeled as positive   (0,y),\,  and the points on the   y\, -axis below   0,0\,  are labeled as negative   (0,-y).\,  A point is plotted as a location on the plane using its coordinates from the grid formed by the   x\,  and   y\, -axes. If you draw a line perpendicular to the   x\, -axis from a point you pick then that point has the same   x\, -coordinate as the point where that line crosses the   x\, -axis. If you draw a line perpendicular to the   y\, -axis from your point then it has the same   y\, -coordinate as the point where that line crosses the   y\, -axis. If you need to sharpen your knowledge in this area, this link/section should help: The Coordinate (Cartesian) Plane

An equation and its graph can be referred to as equal. This is true since a graph is a representation of a specific equation. This is because an equation is a group of one or more variables along with one or more numbers and an equal sign (  x=1,\,  y=x+1,\,  and  y=x^2+2x+1\,  are all examples of equations). Since variables were introduced as way of representing the many possible numbers that could be plugged into the equation. A graph of an equation is a way of drawing the relationship between the numbers that can be input (the independent variable) and the possible outputs that would be produced. For example, in the equation:  y=x+2,\,  we could choose to make the   x\,  the independent variable and the output number would be two more than the input number every time. The graph of this equation would be a picture showing this relationship. On the graph, each   y\, -value (the vertical axis) would be two higher than the (horizontal)   x\, -value that is plugged in because of the   +\, 2\,  in the equation.

Linear Equations and Functions[edit]

This section shows the different ways we can algebraically write a linear function. We will spend some time looking at a way called the "slope intercept form" that has the equation   y = f(x) = m x + b\,.\,

Unless a domain for   x \,  is otherwise stated, the domain for linear functions will be assumed to be all real numbers  \mathbb{R}  and so the lines in graphs of all linear functions extend infinitely in both directions. Also in linear functions with all real number domains, the range of a linear function may cover the entire set of real numbers for   y\,,\,  one exception is when the slope   m=0 \,  and the function equals a constant. In such cases, the range is simply the constant. Another would be a squaring function where the range would be non-negative when  b=0\,.\,

The y-intercept constant b[edit]

It was shown that  y=f(x)=mx+b\,  has infinite solutions (in the UK,  y=mx+c\,;\,  also common  y=ax+b\,,\,  y=a_1x+a_0\,  and  y=-\frac{A}{B}x-\frac{C}{B}\, ). Points  (x,y)\,  will be mapped with independent variable  x\,  assuming the horizontal axis and  y\,  vertical on a Cartesian grid. By assigning  x\,  to a value and evaluating  y\,,\,  a (single) point coordinate solution is found. When  x=0\,,\,  then by zero-product property term  m\times x=0\, ,  and by additive identity terms  0+b=b=y\,.\,  The point  (0,b)\,  is the unique member of the line (linear equation's solution) where the y-axis is 'intercepted'. More about intercepts link:  The  x\,  and  y\,  Intercepts

What does the m tell us when we have the equation   y = f(x) = m x + b \,  ?[edit]

 m \,  is a constant called the slope of the line. Slope indicates the steepness of the line.

Slope[edit]

Two separate points fixed anywhere defines a unique straight line containing the points. Confining this study to plane geometry (R^2) and fixing coordinates for unique points at  (x_{1},y_{1})\,  and  (x_{2},y_{2})\,  a straight line is defined relating two variables in a linear-equation mappable on a graph-plot. When the two points are identical, infinite lines result, even in a single plane. When  x_{1}=x_{2}\,  then a vertical-line mere relation is defined, not a function. Functions are equation-relations evaluating to singularly unique dependent values. Only when (iff)  x_{1}\neq x_{2},\,  then is the line containing the points a linear 'function' of  x.\,

For a linear function, the slope can be determined from any two known points of the line. The slope corresponds to an increment or change in the vertical direction divided by a corresponding increment or change in the horizontal direction between any different points of the straight line.
Let \Delta y=\, increment or change in the y\, -direction (vertical) and
Let  \Delta x=\, increment or change in the x\, -direction (horizontal).
For two points  (x_{1},y_{1})\,  and  (x_{2},y_{2}),\,  the slope of the function line m is given by: m = \frac {\Delta y}{\Delta x} = \frac {y_2 - y_1}{x_2 - x_1}

  • This formula is called the formula for slope measure but is sometimes referred to as the slope formula.

For a linear function, fixing two unique points of the line or fixing the slope and any one point of the line is enough to determine the line and identify it by an equation. There is an equation form for a linear function called the point-slope form of a line2 which uses the slope  m\,  and any one point  (x_{1},y_{1})\,  to determine a valid equation for the function's line:  y - y_1 = m (x - x_1) \,
Algebra/Slope

The Pythagorean Theorem and The Distance Formula

Other forms of linear equations?[edit]

Algebra/Standard Form and Solving Slope

Intercept Form of a Line[edit]

There is one more general form of a linear function we will cover. This is the intercept form of a line, where the constants a and b are such that (a,0) is the x-intercept point and (0,b) is the
y-intercept point.

\frac {x}{a} + \frac {y}{b} = 1 \qquad    where a ≠ 0 and b ≠ 0

Neither constant a nor b can equal 0 because division by 0 is not allowed. The intercept form of a line cannot be applied when the linear function has the simplified form y = m x because the
y-intercept ordinate cannot equal 0.

Multiplying the intercept form of a line by the constants a and b will give

b x + a y = a b \

which then becomes equivalent to the general linear equation form A x + B y + C where A = b, B = a, and C = ab. We now see that neither A nor B can be 0, therefore the intercept form cannot represent horizontal or vertical lines. Multiplying the intercept form of a line by just b gives

\frac {b}{a} x + y = b

if we subtract

\frac {b}{a} x

we get:

y = b - \frac {b}{a} x

which can, in turn, be rearranged to:

y = - \frac {b}{a} x + b

which becomes equivalent to the slope-intercept form where the slope m = -b/a.


Example: A graphed line crosses the x-axis at -3 and crosses the y-axis at -6. What equation can represent this line? What is the slope?

Solution: intercept form:  \qquad  \frac {x}{-3} + \frac {y}{-6} = 1

Multiplying by -6 gives \frac {-6}{-3} x + y = -6

y = -2 x - 6 \

so we see the slope m = -2.

Line y = -2 x - 6 showing intercepts      Graph of y = - 2x - 6 showing intercepts.


The line can also be written as -6 x - 3 y = (-3)(-6) \

6 x + 3 y = -18 \

Example: Can the equation

\frac {x}{2} + \frac {y}{4} = 0

be transformed into an intercept form of a line, (x/a) + (y/b) =1, to find the intercepts?

Solution: No, no amount of valid mathematical manipulation can transform it into the intercept form. Instead multiplying by 4, then subtracting 2x gives

y = -2 x \

which is of the form y = m x where m = -2. The line intersects the axes at (0,0). Since the intercepts are both 0, the general intercept form of a line cannot be used.

Line y = -2 x crossing through (0,0)


Example: Find the slope and function of the line connecting the points (2,1) and (4,4).

Solution: When calculating the slope of a straight line from two points with the preceding formula, it does not matter which is point 1 and which is point 2. Let's set (x1,y1) as (2,1) and (x2,y2) as (4,4). Then using the two-point formula for the slope m:


 m = \frac {4 - 1}{4 - 2} = \frac { 3 }{ 2 }


Slope From 2Points.PNG

Using the point-slope form:

One substitutes the coordinates for either point into the point-slope form as x1 and y1. For simplicity, we will use x1=2 and y1=1.


 y - 1 = \frac {3}{2} (x - 2)


 y - 1 =  \frac {3}{2} x - 3 \,


 \   y =  \frac {3}{2} x - 2



Using the slope-intercept form:

Alternatively, one can solve for b, the y-intercept ordinate, in the general form of a linear function of one variable, y = m x + b.


 b = y - m x \


Knowing the slope m, take any known point on the line and substitute the point coordinates and m into this form of a linear function and calculate b. In this example, (x1,y1) is used.


 b = y_1 - m x_1 \,


 b = 1 - \frac {3}{2} \cdot 2 = 1 - 3 = -2


Now the constants m and b are both known and the function is written as


 y = \frac {3}{2} x - 2       or alternatively as       f(x) = \frac {3}{2} x - 2

__________end of example__________


For another explanation of slope look here:

Slope



Example: Graph the equation 5x + 2y = 10 and calculate the slope.

Solution: This fits the general form of a linear equation, so finding two different points are enough to determine the line. To find the x-intercept, set y = 0 and solve for x.


 5x + 2 \cdot 0 = 10 = 5x \


 x = 10/5 = 2 \


so the x-intercept point is (2,0). To find the y-intercept, set x = 0 and solve for y.


 5 \cdot 0 + 2y = 10 = 2y \


 y = 10/2 = 5 \


so the y-intercept point is (0,5). Drawing a line through (2,0) and (0,5) would produce the following graph.

Line 5x + 2y = 10 showing intercepts Graph of 5x + 2y = 10 showing intercepts

To determine the slope m from the two points, one can set (x1,y1) as (2,0) and (x2,y2) as (0,5), or vice versa and calculate as follows:

m = \frac {y_2 - y_1}{x_2 - x_1} = \frac {5 - 0}{0 - 2} = - \frac {5}{2} = - 2.5

__________end of example__________

Summary of General Equation Forms of a Line[edit]

The most general form applicable to all lines on a two-dimensional Cartesian graph is

A x + B y = C \

with three constants, A, B, and C. These constants are not unique to the line because multiplying the whole equation by a constant factor gives a new set of valid constants for the same line. When B = 0, the rest of the equation represents a vertical line, which is not a function. If B ≠ 0, then the line is a function. Such a linear function can be represented by the slope-intercept form which has two constants.

slope-intercept form:

y = m x + b \

The two constants, m and b, used together are unique to the line. In other words, a certain line can have only one pair of values for m and b in this form.

The point-slope form given here

 y - y_1 = m (x - x_1) \,

uses three constants; m is unique for a given line; x1 and y1 are not unique and can be from any point on the line. The point-slope cannot represent a vertical line.

The intercept form of a line, given here,

\frac {x}{a} + \frac {y}{b} = 1    a ≠ 0 and b ≠ 0

uses two unique constants which are the x and y intercepts, but cannot be made to represent horizontal or vertical lines or lines crossing through (0,0). It is the least applicable of the general forms in this summary.

Of the last three general forms of a linear function, the slope-intercept form is the most useful because it uses only constants unique to a given line and can represent any linear function. All of the problems in this book and in mathematics in general can be solved without using the point-slope form or the intercept form unless they are specifically called for in a problem. Generally, problems involving linear functions can be solved using the slope-intercept form
(y = m x + b) and the formula for slope.

Discontinuity in Otherwise Linear Equations[edit]

Let variable y be dependent upon a function of independent variable x

y=f(x)\, ,  also  y(x)=f \,.

y is also the function f, and x is also the argument ( ). Let y be the expressed quotient function

y=\frac{2x^2-5x+3}{x-1} .

The graph of y's solution plots a continuous straight line set of points except for the point where x would be 1. Evaluation of the denominator with x=1 results in division by zero, an undefined condition not a member element of R and outside algebraic closure. y has a discontinuity (break) and no solution at point 1,-1. It becomes important to treat each side of a break separately in advanced studies.
Discontinuous Linear Function.PNG

y's otherwise linear form can be expressed by an equation removed of its discontinuity. Factor x-1 from the 2x^2-5x+3 numerator (use synthetic division).

y=\frac{2x^2-5x+3}{x-1} .
y=\frac{(2x-3)(x-1)}{(x-1)} .
y=2x-3 \,,\;x\neq1  (for all x except 1) .

Reducing its (x-1) multiplicative inverse factors (reciprocals) to multiplicative identity (unity) leaves the (2 x - 3) factor (with implied universal-factor 1/1). Limiting this simpler function's domain; 'all x except x = 1, where x is undefined' or simply 'and x ≠ 1' (implying 'and R2 '); equates it to the original function. This expression is a linear function of x, with slope m = 2 and a y-intercept ordinate of -3. The expression 2x-3 evaluates to -1 at x = 1, but function y is undefined (division by zero) at that point. There is a discontinuity for function y at x = 1. Practically the function has a sort of one-point hole (a skip), shown on the graph as a small hollow circle around that point. Lines, rays and line segments (and arcs, chords and curves) are shown discontinuous by dashed or dotted lines.

Note: non-linear equations may also be discontinuous--see the subsequent graph plot of the reciprocal function y = 1/x, in which y is discontinuous at x = 0 not just for a point, but over a 'double' asymptotic extremum pole along the y-axis. As x is evaluated at smaller magnitudes (both - and +) closer to zero, y approaches no definition in both the - and + mappings of the function.

Example: What would the graph of the following function look like?

y = \frac {x^2 - 4}{x + 2} .

Solution:

y = \frac {x^2 - 4}{x + 2} = \frac {(x + 2)(x - 2)}{(x + 2)} .

Reduce the reciprocal (x + 2) factors to unity. This makes y = x - 2 for all x except x = -2, where there is a discontinuity. The line y = x - 2 would have a slope m = 1 and a
y-intercept ordinate of -2. So for the final answer , we graph a line with a slope of 1 and a y-intercept of -2, and we show a discontinuity at x = -2, where y would otherwise have been equal to -4.

Example Discontinuity Linear Function.PNG

Example: Write a function which would be graphed as a line the same as y = 2 x - 3 except with two discontinuities, one at x = 0 and another at x = 1.

Solution: The function must have a denominator with the factors

denominator = (x - 0)(x - 1) = x (x - 1) .

to have 'zeros' at the two x values. The function's numerator also gets the factors preserving an overall factor of unity, the expressions are multiplied out:

y = \frac {(2 x - 3) x (x - 1)}{x (x - 1)}= \frac {2 x^3 - 5 x^2 + 3 x}{x^2 - x} .

__________end of example__________