Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

The plane and the graph

A function is a rule, and a rule is invisible. Asking whether it ever repeats an output, or how many times it hits zero, or where it is largest, means grinding through algebra for answers that a picture would give away instantly.

The device that supplies the picture is the coordinate plane, and this lesson builds it and puts it to work on the two functions the course has met so far, the linear and the quadratic. It assumes only the algebra of the earlier lessons and the definition of a function.

Two numbers for one point

The idea appears in Descartes' La Géométrie of 1637, published as an appendix to the Discourse on Method, and independently in unpublished work of Fermat. Fix two perpendicular number lines crossing at a point called the origin. Any point in the plane is then named by two numbers, how far along and how far up, written (x,y).

The consequence is larger than the construction. Geometry becomes algebra and algebra becomes geometry: a curve is the set of points whose coordinates satisfy an equation, and an equation is a curve. Two thousand years of Greek geometry, done with compass and straightedge on figures, becomes computation with letters, and problems that needed a clever construction each time fall to routine.

For a function this pairing has a specific use. Plot the point (x,f(x)) for every x in the domain, and the resulting set of points is the graph of f. Everything the rule does is now laid out at once, which is why the rest of this course reasons about functions with one eye on their graphs.

Distance, and the first theorem to fall out

Take two points (x1,y1) and (x2,y2). The horizontal gap between them is x2-x1 and the vertical gap is y2-y1, and those two gaps are the legs of a right triangle whose hypotenuse joins the points. Pythagoras' theorem gives the length immediately:

d=(x2-x1)2+(y2-y1)2

The squares mean the order of subtraction does not matter, which is as it should be, since distance has no direction. The midpoint is even simpler, the average of the coordinates separately, big((x1+x2)/2,(y1+y2)/2big).

Example. Find the distance between (2,-3) and (7,9), and their midpoint.

The gaps are 7-2=5 and 9-(-3)=12, so d=25+144=169=13. The midpoint is (4.5,3).

Now you. Find the distance between (-4,5) and (8,-11).

Answer

The gaps are 12 and -16, so d=144+256=400=20.

Circles come free from the same formula. The set of points at distance r from (a,b) is (x-a)2+(y-b)2=r2, which is a definition turned directly into an equation. Note that a circle is not the graph of a function: the input x=3 has two points above it on a circle centred at the origin, and a function must have exactly one output. This is the vertical line test: a set of points is the graph of a function precisely when no vertical line meets it twice.

The straight line

The defining feature of a line is that the ratio of vertical change to horizontal change is the same everywhere on it. That constant is the slope or gradient m=(y2-y1)/(x2-x1), and it is the rate at which the output changes per unit of input.

Given a slope m and any point (x1,y1) on the line, every other point (x,y) satisfies (y-y1)/(x-x1)=m, which rearranges to the point-slope form y-y1=m(x-x1). Expanding gives y=mx+c, where c is the value at x=0, the intercept. Vertical lines are the exception: their slope is undefined, since the horizontal change is zero, and they are written x=k and are not graphs of functions.

Two lines are parallel when their slopes are equal. They are perpendicular when m1m2=-1, which can be seen by rotating a slope triangle a quarter turn: a rise of a over a run of b becomes a rise of -b over a run of a. So the perpendicular to a line of slope 3 has slope -1/3.

Example. Find the line through (2,7) and (6,19).

The slope is (19-7)/(6-2)=12/4=3. Using the first point, y-7=3(x-2), so y=3x+1. Check the second point: 3×6+1=19.

Now you. Find the line through (-3,11) and (5,-5), and check both points.

Answer

The slope is (-5-11)/(5+3)=-16/8=-2, so y-11=-2(x+3) and y=-2x+5. Checking: -2(-3)+5=11 and -2(5)+5=-5.

A line through real data

Amos Dolbear noticed in 1897 that snowy tree crickets chirp faster when it is warmer, and that the relationship is close to linear over the range where the insects are active. His rule, still quoted, is that the temperature in degrees Fahrenheit is 50 plus a quarter of the amount by which the chirp count per minute exceeds 40.

As a function that is T(N)=50+(N-40)/4, a line of slope 1/4 through the point (40,50). At 120 chirps per minute it predicts 70 °F, at 160 it predicts 80 °F, and at 80 it predicts 60 °F. The slope carries the physical content: four extra chirps per minute for each additional degree, which is a statement about how insect metabolism responds to temperature.

The limits of the model are visible in the same equation, which is the point of writing it down. Set N=0 and it predicts 40 °F, whereas silence in fact means only that the crickets have stopped, and below about 50 °F they do. Extrapolating a fitted line outside the range of the data that produced it is the commonest abuse of a linear model, and the graph makes the abuse obvious: the line continues cheerfully into a region where no data ever existed.

What a graph shows at a glance

Draw a function and its algebraic properties become visual. The domain is the set of x values under which the curve exists; the range is the set of y values it reaches. Solutions of f(x)=0 are the points where the curve crosses the horizontal axis, so the number of solutions can be counted rather than derived. Solutions of f(x)=g(x) are the crossings of two curves, which is why the intersection of y=3x+1 and y=-2x+5 at x=0.8, y=3.4 is both a picture and the solution of a pair of simultaneous equations.

Injectivity, the condition for having an inverse from the previous lesson, becomes the horizontal line test: f is injective exactly when no horizontal line meets its graph twice. The parabola y=x2 fails it at every positive height, which is the visual form of the fact that 3 and -3 share a square.

The graph of an inverse is a reflection of the graph of the function in the line y=x, because reflecting swaps the roles of the coordinates, and swapping input and output is exactly what the inverse does. This is a good check on any inverse computed algebraically.

The parabola, read off its vertex form

The graph of y=ax2+bx+c is a parabola, opening upward when a>0 and downward when a<0. Its most useful feature is its turning point, and completing the square from the third lesson delivers it without further work.

Take y=2x2-12x+5. Factor 2 out of the first two terms: y=2(x2-6x)+5. Complete the square inside: x2-6x=(x-3)2-9, so y=2big[(x-3)2-9big]+5=2(x-3)2-13.

Now everything is visible. The squared term is never negative, so y is smallest when it is zero, at x=3, where y=-13. The vertex is (3,-13), the curve is symmetric about the vertical line x=3, and since the minimum is below zero the parabola crosses the axis twice, at the two roots computed in the earlier lesson, 3±6.5. The discriminant and the vertex are saying the same thing in two languages: the sign of the discriminant is the question of whether the vertex sits on the far side of the axis from the opening.

Example. Put y=x2-6x+5 into vertex form and describe the graph.

x2-6x=(x-3)2-9, so y=(x-3)2-4. The vertex is (3,-4), opening upward, symmetric about x=3. Since y=0 gives (x-3)2=4, the crossings are at x=1 and x=5, and the vertex sits midway between them as symmetry requires.

Now you. Put y=3x2+12x-7 into vertex form and give the vertex.

Answer

y=3(x2+4x)-7=3big[(x+2)2-4big]-7=3(x+2)2-19, so the vertex is (-2,-19). Check by substituting x=-2 into the original: 12-24-7=-19.

Shifting, stretching, reflecting

Vertex form is an instance of something general. Once the graph of y=f(x) is known, four modifications give a family of related graphs, and knowing them removes most of the work of plotting.

Replacing f(x) by f(x)+k moves the graph up by k, which is obvious since every output gains k. Replacing it by f(x-h) moves it right by h, which surprises people, and the reason is that the new function at x=h does what the old one did at x=0: the input must be larger by h to produce the same behaviour. Multiplying the output, af(x), stretches vertically by a factor a, and a negative a also flips the graph upside down. Multiplying the input, f(bx), squeezes horizontally by a factor b, again the opposite of what the symbol suggests, for the same reason as the shift.

So y=2(x-3)2-13 is the basic parabola y=x2 moved three right, stretched by two, and dropped thirteen. Every quadratic is the same curve in a different position, which is a genuinely surprising fact: parabolas differ in scale and place but not in shape. Later lessons apply the same four moves to exponentials and to waves, where a horizontal shift becomes a phase and a horizontal squeeze becomes a frequency.

Where the picture misleads

A graph is evidence, not proof, and the honest limits are worth carrying. A plot shows a window, and behaviour outside it is invisible: y=x3-3x+1 looks like a rising line if plotted from -100 to 100, and only a window a few units wide reveals its two turning points. Features can also be too small to see, and a curve that appears to touch the axis may cross it just below the resolution of the drawing.

Nor does a graph settle exact values. It shows that y=x2-2 crosses the axis somewhere near 1.41; it cannot tell you that the crossing is irrational, which took the argument sketched in the first lesson. Pictures are for finding out what is true. Algebra, and eventually proof, is for establishing it.

Both curves in this lesson are members of one family: the linear function is degree one and the quadratic degree two, and nothing in the definition of a polynomial stops at two. What degree three and beyond look like, and how their roots and their factors are the same information twice, is the next lesson.