Algebra/Function Graphing

From testwiki
Revision as of 22:19, 4 May 2011 by 65.34.156.249 (talk) (Linear Equations and Functions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Plotting Points on a Graph

A Cartesian coordinate system is a way of representing a point with a rectangular coordinate system invented by Rene Descartes, a French mathematician and philosopher. Ordered pairs of numbers can be represented and plotted as points on a graph using a two-dimensional Cartesian coordinate system which has perpendicular horizontal and vertical axes (axes is plural for axis) both acting as real number lines. Such graphs show how the numbers (or coordinates) in ordered pairs are related to each other. The first number in the ordered pair is called the abscissa, and is plotted based on the horizontal axis, often called the x-axis. By convention, the positive numbers are to the right and the negative numbers to the left on the horizontal axis. The second number in the ordered pair is called the ordinate and is plotted based on the vertical axis, often called the y-axis. By convention, the positive numbers go up and the negative numbers go down on the vertical axis. For an abscissa represented by x and an ordinate represented by y, the ordered pair is typically represented by the notation (x,y) and plotted as a point on the graph as shown in the following diagram.

How do you remember the order of numbered pairs?: Think of a roller coaster. "If you do it RIGHT, you might throw UP." Or, if the graph were a street with tall buildings, you have to go along the street (RIGHT) before you can enter and go UP the stairs.Or, you crawl (RIGHT) before you walk (Stand UP).

     In this plot, (x,y) is the point (3,4).

The horizontal and vertical axes could theoretically extend out to infinity in both positive and negative directions for each axis. The "rectangular" grid for plotting the ordered pairs is in a plane which can also extend out to infinity in all combinations of positive and negative directions, although graph displays are limited to the areas of most interest in practice. The point where the axes intercept is (0,0), which is called the origin. In this diagram, (x,y) is the point (3,4) located by starting at (0,0), moving 3 in the positive x direction (to the right), and moving 4 in the positive y direction (upwards), as shown by the blue lines in the diagram. The horizontal and vertical axes divide the grid into four areas called quadrants. The quadrants are:


Quadrant x-axis (abscissa) y-axis (ordinate)
I Positive Positive
II Negative Positive
III Negative Negative
IV Positive Negative

Graphs of Functions or Relations

Continuous sets of points can be represented by lines or curves on a graph showing how continuous paired quantities relate to each other. Such numbers or quantities are called variables and are often represented by letters such as x or y in graphics or algebra. A function, relation, or equation can define how, as one variable quantity such as x varies, another related quantity or variable such as f(x) or y can vary (when f is a function of x). A graph can then illustrate by means of points, lines (straight or curved), or both how these variables are related to each other. The horizontal axis is typically used for plotting the input variable, often called x, of a function or some similar independent variable. An independent variable is one which a person can control or vary at will to see how it affects a quantity which is a dependent variable, i. e. one which is determined by the independent variable. The vertical axis is then typically used for plotting the output of a function such as f(x), or a dependent variable often called y.

Any equation which has two variables can effectively define a relation between the two variables and the relation can be plotted on a two-dimensional Cartesian coordinate graph. In any particular equation, relation, or function definition, numbers which stay the same, i. e. which are not variables, are often called constants. Even if someone does not know much fancy algebra, a person may start getting an idea of what a function or a two-variable equation or relation looks like in a graph by choosing various numbers for one of the variables from the domain and calculating corresponding numbers of the other variable (in the range) to determine as many ordered pairs as practical and plotting those points on a graph. After enough points are plotted, one may be able to estimate what a continuous relation looks like by connecting the calculated points by a straight or curved line, depending on the situation.


Exercise: For the function y = x2 - 1, set up a table as follows:


Table for various values of x and y :
x y
0 ?
1 ?
-1 ?
2 ?
-2 ?
3 ?
-3 ?
? ?
? ?
etc.


Determine as many points as you feel comfortable to make a plot of this equation on a graph. Then on graph paper, or using a computer, draw x and y axes on a grid of squares. Then plot the (x,y) ordered pairs as points on the graph. Finally, when you think you have plotted enough points to get a feel for the shape of the function, connect the points with a curved line to see what the function graph looks like. If you are not sure in a part of the graph, you can always calculate more points to fill in that place.

Linear Equations and Functions

If the graphing of the equation forms a straight line, then the equation is considered a linear equation with two variables. The following equation is a simple example of such a linear equation:

example: ima biiig fagget head !

yx=2


Even if the equation has only one of the two variables but is graphed on a two dimensional graph as a line, the equation is still considered a linear equation.

If the graph of a function with a single input variable forms a straight line, then the function is considered a linear function. Linear equations with two variables can usually be algebraically arranged to give the form of a linear function. Consider, the following simple linear function f(x) defined as:

f(x)=x+2

We can define y = f(x); therefore

y=x+2


where x and y are variables to be plotted in a two-dimentional Cartesian coordinate graph as shown here:

This function is equivalent to the previous example of a linear equation, y - x = 2. The arrows at each end of the line indicate that the line extends infinitely in both directions. All linear functions of a single input variable have or can be algebraically arranged to have the general form:


y=f(x)=mx+b


where x and y are variables, f(x) is the function of x, m is a constant called the slope of the line, and b is a constant which is the ordinate of the y-intercept (i. e. the value of y where the function line crosses the y-axis). The slope indicates the steepness of the line. In the previous example where y = x + 2, the slope m = 1 and the y-intercept ordinate b = 2. The y = mx+b form of a linear function is called the slope-intercept form.

Unless a domain for x is otherwise stated, the domain for linear functions will be assumed to be all real numbers 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 will cover the entire set of real numbers for y, unless the slope m = 0 and the function equals a constant. In such cases, the range is simply the constant.

Conversely, if a function has the general form y = mx + b or if it can be arranged to have that form, the function is linear. A linear equation with two variables has or can be algebraically rearranged to have the general form1:

Ax+By=C

If one equates -A/B to the slope m and C/B to the y-intercept ordinate b, it can be seen that the general form for a linear equation and the slope-intercept form for a linear function are practically interconvertible except for the fact that, in a linear function, the B constant in the linear equation form cannot equal 0.

Slope

Two different points plotted on a plane are enough to determine the identity of a straight line, if it is assumed these points are part of the line. So, if the coordinates of points (x1,y1) and (x2,y2) are known, then a straight line is defined on the graph and a two variable linear equation can be determined, unless both x values are equal and both y values are equal. If x1 = x2 and y1 = y2, then the two points are the same and many lines can go through the point. If x1 = x2, but
y1 ≠ y2, then the linear equation is not a function because there is more than one y value per x value. If x1 ≠ x2, then the line going through the points defines a linear function of x.

For a linear function, the slope can be determined from any two known points on 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 on the straight line.


Let Δy = increment or change in the y-direction (vertical) and

Let Δx = increment or change in the x-direction (horizontal).

For two points (x1,y1) and (x2,y2), the slope of the function line m is given by:


m=ΔyΔx=y2y1x2x1
  • This formula is called the formula for slope measure but is sometimes referred to as the slope formula.

For a linear function, knowing any two different points on the line or knowing the slope and any one point on 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 (x1,y1) to determine a valid equation for the function's line:


yy1=m(xx1)

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=4142=32


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.


y1=32(x2)


y1=32x3


 y=32x2



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=ymx 


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=y1mx1


b=1322=13=2


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


y=32x2      or alternatively as      f(x)=32x2

_________________________________________end of example_____________________________________

For completely horizontal lines, the difference in y coordinates between any two points is 0, so the slope m = 0, indicating no steepness in the line at all. If the line extends between right-upper (+,+) and left-lower ( -, -) directions, then the slope is positive. As the slope increases, the line becomes steeper until the line is almost vertical when the slope is very large. When the slope m = 1, the line is diagonal with an angle halfway between the x and y axes. If the line extends between left-upper (-,+) and right-lower (+, -) directions, then the slope is negative. As the slope changes from 0 to very negative numbers, the steepness in the opposite direction increases. Compare the slope ( m ) values in the following graph of functions y = 1 (where
m = 0), y = (1/2) x + 1, y = x + 1, y = 2 x, y = -(1/2) x + 1, y = -x + 1, and y = -2 x + 1. For all two-variable linear equations that can be converted to linear functions, the same calculation applies to slopes for those lines.

x=c and y=c equation lines, where c = constant

This section discusses the graphing of simple linear equations of the form x = c and y = c, where x and y are variables and c is any real number constant.

In the equation x = c, x can only be the real number c, and since nothing is said about y, y can be equal to any real number regardless of x. Therefore, the graph of x = c is a straight vertical line where x = c, but covering all positive and negative values of y (see the following diagram).

x = c, where c = 3

The domain of this relation is just the set { c } and the range covers all real numbers (unless otherwise specified). Because there are multiple possible values of y for the single value of x, equations of the form x = c are not functions, but can be considered relations. The lines of such equations have no slope, although some would say the slope is infinity because the lines has infinite steepness. Other lines where the steepness approaches vertical have very large slopes. These are the only types of linear equations of the general form shown previously which are not linear functions. The equation x = 0 is equivalent to the y-axis.

Equations of the form y = c are linear functions of the general form y = m x + b where m = 0 and the constant c equals the y-intercept b (in the general form). Since the slope is 0, the graph of this function is a straight horizontal line, crossing through the y-axis at c, and extends infinitely in the positive and negative directions for all values of x (see the following diagram).

y = c, where c = 3

The domain for such functions covers all real numbers (unless otherwise specified), but the range is just the set { c }. The equation y = 0 is equivalent to the x-axis.

x and y axes intercepts

An axis intercept point is a point where the graph of a function, relation, or equation intersects one of the axes. Alternatively, an axis intercept may simply refer to the number value on the axis where the intersection occurs. An axis intercept on the x-axis is called an x-intercept.
If the intersection with the x-axis occurs at (a,0), then the x-intercept point is (a,0) and the
x-intercept is often simply referred to as a. Likewise, an axis intercept on the y-axis is called a
y-intercept. If the intersection with the y-axis occurs at (0,b), then the y-intercept point is (0,b) and the y-intercept is often simply referred to as b. For lines based on equations of the form
x = c, the x-intercept is the point (c,0) and there is no y-intercept unless x = 0. For lines based on equations of the form y = c, the y-intercept is the point (0,c) and there is no x-intercept unless y = 0. For linear equations or functions that can be expressed in the form


y=mx


where the slope m is any constant not equal to 0, the x-intercept and y-intercept are the same point, (0,0), with no other axis intercepts. For all other linear equations with two variables, x and y, the lines extending infinitely in both directions have to cross both axes somewhere; therefore, such equations will have one x-intercept and one y-intercept. For that sort of equation, knowing where both intercepts are is enough to be able to determine and draw the line through the points to graph the equation.

When one is given a function or equation of two variables which is apparently linear and the goal is to graph the line, finding the axes intercepts is often the easiest way to go about doing it. To find the x-intercept, set y = 0 and solve for x. To find the y-intercept, set x = 0 and solve for y.
If the intercepts are different points, then a line can be drawn through the two intercept points.
If both intercepts are (0,0), then another point must be determined to graph the line from two points or the slope can be determined and used to plot the line going though the origin (0,0).
Of course if the equations are of the form x = c or y = c, the horizontal or vertical lines are very simple to plot.

Also, after the intercepts are found, the slope can be calculated from two different intercept points using the two-point slope formula previously mentioned.


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+20=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.


50+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=y2y1x2x1=5002=52=2.5

_________________________________________end of example_____________________________________

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.

xa+yb=1    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

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

bax+y=b

which can be rearranged to

y=bax+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:

x3+y6=1

Multiplying by -6 gives 63x+y=6

y=2x6 

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 6x3y=(3)(6) 

6x+3y=18 

Example: Can the equation

x2+y4=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=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.

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

_________________________________________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

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:

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

yy1=m(xx1)

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,

xa+yb=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's look at the function

y=2x25x+3x1 .

If we plot points and graph this function, we see that we get a straight line except for a point at
x = 1. At x = 1, the denominator, x - 1, becomes 0, and the function is not defined at this point.

The otherwise linear form of this function can be explained by the fact that the expression
2 x2 - 5 x + 3 in function y can be factored as follows:

y=2x25x+3x1=(2x3)(x1)(x1)=2x3 for all x except 1

The factor (x - 1) can be canceled out from the numerator and denominator for all x except
x = 1, where x is undefined. The remaining expression, 2 x - 3, is a linear function of x, with a slope m = 2 and a y-intercept ordinate of -3. The expression, 2x - 3, would be equal -1 at x = 1, but function y is not defined at that point because that would make the denominator = 0. Since the function is not defined at x = 1, we say there is a discontinuity for the function y at x = 1, practically speaking a sort of one-point hole in the function, shown on the graph as a small hollow circle at that point.

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

y=x24x+2

Solution:

y=x24x+2=(x+2)(x2)(x+2)

The (x + 2) factors cancel in both numerator and denominator. 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 hahd 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: We need the following two factors in the denominator to make it 0 at both those values of x:

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

We also multiply the numerator by this expression in the function in order to cancel it out in the denominator, then we can multiply the expressions out as shown:

y=(2x3)x(x1)x(x1)=2x35x2+3xx2x

_________________________________________end of example_____________________________________

Sample Graphs of Various Functions and Relations

           y = |x|

File:Y=-1x squared.PNG            y = x2

           y = 1/x

y =x      y = -x      y = |x|      y=-|x|      y=x2      y=-x2      y=x3      y = 1/x      y=-1/(x-1)

y=x! other functions and relations in other sections

inequalities parabolas y=(10 or e) to the x y = log x

polynomials


cubics and squares

what this means is that the graphs of y = x^N(even) and y = x^N (odd) will always look in certain ways.


Second Graphing section: translations symmetries +/- inversions inverse relations ellipse circle square roots inequalities of these


Other functions and relations

Symmetry about: x-axis y-axis y=x y=-x

Translation (shift) in x and y directions

stretching about x-axis or y-axis

asymptotes

inverse functions (to be originally introduced in Functions, graphing aspects covered here)

circles

ellipses

inequalities in non-linear relations

stretching relations about x or y axes



Newton's method

Given 0=x^a y^b + x^c y^d etc, can deduce asymptotes/intersects from smallest polygon containing points (a,b) (c,d) etc


References:

1. ELEMENTARY GEOMETRY for College Students, 2nd Edition, by Daniel Alexander and

Geralyn Koeberlein, Houghton Mifflin Company, Boston, MA 1999.

2. ALGEBRA AND TRIGONOMETRY with Analytic Geometry, Ninth Edition, by Earl Swokowski

and Jeffery Cole, Brooks/Cole Publishing Company 1997.



Previous: Functions
Next: Systems of Simultaneous Equations
Go to: Additional function and relation graphing