# Algebra/Function Graphing

Algebra
 ← Functions Function Graphing Systems of Equations →

## Functions have an Independent Variable and a Dependent Variable

When we look at a function such as  ${\displaystyle f(x)={\frac {1}{2}}x,}$  we call the variable that we are changing--in this case  ${\displaystyle 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  ${\displaystyle x\,}$  is independent is because we can pick any value for which the function is defined--in this case real  ${\displaystyle \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  ${\displaystyle y\,}$  with our function  ${\displaystyle y={\frac {1}{2}}x,}$  then  ${\displaystyle 2y=2({\frac {1}{2}}x),}$  then  ${\displaystyle 2y=x,\,}$  then  ${\displaystyle g(y)=2y.\,}$

The independent variable is now  ${\displaystyle y\,}$  and the dependent variable  ${\displaystyle x.\,}$

• Note: this is a very unusual case where the ordered pair  ${\displaystyle (g(y),y)\,}$  is reverse mapped  ${\displaystyle y\mapsto x\,}$  and corresponding reverses (dependent, independent), (range, domain), and now  ${\displaystyle x\,}$  must be singular for each and every  ${\displaystyle 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  ${\displaystyle (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

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

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

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

### Explicit and Implicit Functions

Variables like  ${\displaystyle x\,}$  and  ${\displaystyle y\,}$  formulate a 'relation' using simple algebra.  ${\displaystyle f,\,}$   ${\displaystyle g,\,}$  and   ${\displaystyle h\,}$  commonly denote functions. Function notation  ${\displaystyle f(x),\,}$  read "eff of ex", denotes a function with 'explicit' dependence on the independent variable  ${\displaystyle x.\,}$  By assigning variable  ${\displaystyle y\,}$  to  ${\displaystyle f(x),\,}$   ${\displaystyle y=f(x),\,}$   ${\displaystyle y\,}$  is now an 'implicit' function of   ${\displaystyle x\,}$  using equation notation. If  ${\displaystyle f(x)\,}$  is  ${\displaystyle {\frac {x}{2}},}$  then  ${\displaystyle y={\frac {x}{2}}}$   [ ${\displaystyle y(x)\,}$  would denote an 'explicit' function of  ${\displaystyle 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

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  ${\displaystyle x\,}$ -axis, and to then pick a line perpendicular to this line and call it the  ${\displaystyle y\,}$ -axis. He then labeled this intersection point  ${\displaystyle (0,0)\,}$  and origin O. The points to the left (or behind) of this point each represent a negative number that we label as  ${\displaystyle (-x,0).\,}$  The points to the right (or ahead) of this point each represent a positive number that we label as  ${\displaystyle (x,0).\,}$  The points on the  ${\displaystyle y\,}$ -axis that are above  ${\displaystyle 0,0\,}$  are labeled as positive  ${\displaystyle (0,y),\,}$  and the points on the  ${\displaystyle y\,}$ -axis below  ${\displaystyle 0,0\,}$  are labeled as negative  ${\displaystyle (0,-y).\,}$  A point is plotted as a location on the plane using its coordinates from the grid formed by the  ${\displaystyle x\,}$  and  ${\displaystyle y\,}$ -axes. If you draw a line perpendicular to the  ${\displaystyle x\,}$ -axis from a point you pick then that point has the same  ${\displaystyle x\,}$ -coordinate as the point where that line crosses the  ${\displaystyle x\,}$ -axis. If you draw a line perpendicular to the  ${\displaystyle y\,}$ -axis from your point then it has the same  ${\displaystyle y\,}$ -coordinate as the point where that line crosses the  ${\displaystyle 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 (  ${\displaystyle x=1,\,}$  ${\displaystyle y=x+1,\,}$  and  ${\displaystyle 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:  ${\displaystyle y=x+2,\,}$  we could choose to make the  ${\displaystyle 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  ${\displaystyle y\,}$ -value (the vertical axis) would be two higher than the (horizontal)  ${\displaystyle x\,}$ -value that is plugged in because of the  ${\displaystyle +\,2\,}$  in the equation.

## Linear Equations and Functions

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  ${\displaystyle y=f(x)=mx+b\,.\,}$

Unless a domain for  ${\displaystyle x\,}$  is otherwise stated, the domain for linear functions will be assumed to be all real numbers  ${\displaystyle \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  ${\displaystyle y\,,\,}$  one exception is when the slope  ${\displaystyle 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  ${\displaystyle b=0\,.\,}$

## The y-intercept constant b

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

## What does the m tell us when we have the equation  ${\displaystyle y=f(x)=mx+b\,}$ ?

${\displaystyle m\,}$  is a constant called the slope of the line. Slope indicates the steepness of the line.

#### Slope

Two separate points fixed anywhere defines a unique straight line containing the points. Confining this study to plane geometry (${\displaystyle R^{2}}$) and fixing coordinates for unique points at  ${\displaystyle (x_{1},y_{1})\,}$  and  ${\displaystyle (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  ${\displaystyle 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)  ${\displaystyle x_{1}\neq x_{2},\,}$  then is the line containing the points a linear 'function' of  ${\displaystyle 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 ${\displaystyle \Delta y=\,}$ increment or change in the ${\displaystyle y\,}$ -direction (vertical) and
Let ${\displaystyle \Delta x=\,}$ increment or change in the ${\displaystyle x\,}$ -direction (horizontal).
For two points  ${\displaystyle (x_{1},y_{1})\,}$  and  ${\displaystyle (x_{2},y_{2}),\,}$  the slope of the function line m is given by: ${\displaystyle 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  ${\displaystyle m\,}$  and any one point  ${\displaystyle (x_{1},y_{1})\,}$  to determine a valid equation for the function's line: ${\displaystyle y-y_{1}=m(x-x_{1})\,}$
Algebra/Slope

The Pythagorean Theorem and The Distance Formula

## Other forms of linear equations?

Algebra/Standard Form and Solving Slope

### Intercept Form of a Line

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.

${\displaystyle {\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

${\displaystyle bx+ay=ab\ }$

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

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

if we subtract

${\displaystyle {\frac {b}{a}}x}$

we get:

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

which can, in turn, be rearranged to:

${\displaystyle 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: ${\displaystyle \qquad {\frac {x}{-3}}+{\frac {y}{-6}}=1}$

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

${\displaystyle y=-2x-6\ }$

so we see the slope m = -2.

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

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

${\displaystyle 6x+3y=-18\ }$

Example: Can the equation

${\displaystyle {\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

${\displaystyle y=-2x\ }$

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.

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:

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

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.

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

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

${\displaystyle \ 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.

${\displaystyle b=y-mx\ }$

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.

${\displaystyle b=y_{1}-mx_{1}\,}$

${\displaystyle 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

${\displaystyle y={\frac {3}{2}}x-2}$      or alternatively as      ${\displaystyle 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.

${\displaystyle 5x+2\cdot 0=10=5x\ }$

${\displaystyle x=10/5=2\ }$

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

${\displaystyle 5\cdot 0+2y=10=2y\ }$

${\displaystyle 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.

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:

${\displaystyle 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

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

${\displaystyle Ax+By=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:

${\displaystyle y=mx+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

${\displaystyle 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,

${\displaystyle {\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

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

${\displaystyle y=f(x)\,,}$  also  ${\displaystyle y(x)=f\,.}$

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

${\displaystyle 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 ${\displaystyle 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.

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

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

Reducing its (x-1) multiplicative inverse factors (reciprocals) to multiplicative identity (unity) leaves the ${\displaystyle (2x-3)}$ factor (with implied universal-factor 1/1). Limiting this simpler function's domain; 'all ${\displaystyle x}$ except ${\displaystyle 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 ${\displaystyle 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?

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

Solution:

${\displaystyle 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: 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:

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

__________end of example__________