OK, so in general,

if let's say G is a function from R to R. The graph of G,

an important concept here,

is a set of points in the plane.

So lets give it a name,

lets call it graph of G,

this is equal to the set of all points,

x comma y, ∈ R two, such that y is equal to G of x.

And that's a really important distinction,

the visual way of drawing the graph.

Lets see some examples. So, for example look draw up front.

Suppose, G of x is the absolute value of x.

Let's draw the graph. We already know that G of x is equal to

x if x is greater than or equal to zero and minus x if x is less than zero.

It turns out that this graph looks like this.Well. We've seen that before.

Often people will write then,

y equals absolute value of x here.

What that is telling you is, that every single point on this graph,

the y coordinate is equal to the absolute value of the x coordinate.

So in other words, if this is two, the y coordinate there is two,

which is the absolute value of two.

This is in fact the point,

two, comma the absolute value of two.

On the other hand,

if I take minus two,

and I look at the y coordinate,

that's the absolute value of minus two.

So this point here, is, minus two,

comma, the absolute value of of minus two.

And that's the idea of a graph,

two Okay, lets do one more example.

Suppose H of x is equal x squared.

That's one of the things that we saw at the very beginning.

So lets draw our set of axis.

One of things we're going to learn here is how to graph

a function if you don't know what the graph looks like.

The other two are sort of cheating.

There's no magic bullet here,

there's no tried and true answer.

Really, often what you do is test out a bunch of input and output pairs,

see a pattern, and try and draw a curve through it.

The astute listeners among you will realize

that's exactly what you do in supervised learning,

you try to figure out what the function is going to look like,

like querying, by asking a few inputs and seeing what the outputs are.

So lets make, for example, a table.

Here is H of x and lets figure out a table.

So if x equals zero and H of x would be zero squared equals zero.

So lets plot the point,

(zero, zero) on the graph.

If x equals one then H of x is one squared equals one.

Lets plot the point (1,1) on the graph.

If x equals two,

then two squared equals four.

Lets plot the point (2, 4).

three, three squared equals nine.

We're going way up there.

So somehow it looks like a curve going up like that.

Lets try some negative numbers.

Negative one, we know that negative one squared equals one.

And pretty soon we're going to see a pattern of symmetry like that.

And that's about what the graph of y equals x squared looks like.

That's really how you graph functions.

You don't know what they're supposed to look like.

In a later video, you're going to learn a bunch of

patterns and what later functions look like,

what quadratic functions like this one look like,

what cubic functions look like,

what exponential functions looks like, and things like that.

We are just going to close the video now

by telling you something important, called the vertical line test.

To illustrate what that really gives you, let me give you

an example.

I'm going to draw three curves on the plane and only one of them is actually

the graph of a function.

There is one guy.

There's another one, and choose another color, lets try yellow,

say take a third graph like this.

Okay, so those are three purported graphs.

Here's an interesting fact, red could be a graph of a function.

Red could be the graph of say, y equals x minus one.

Blue could be the graph of a function, even if I can't think of a formula,

that also could be a graph.

Here's the wonderful fact, yellow cannot be the graph of a function.

There is no function

whose graph is yellow. If you think a little bit about it, you'll see why.

It violates something called the vertical line test.

Namely, if I draw a vertical line,

I can find a vertical line which hits the graph at two different points.

Why is that a problem?

Well if this little point here is x, in essence

I'm being proposed two different things for the value of the yellow function of x.

There's that one and there's that one,

and that's illegal, right?

Remember a function is a rule which takes one of

the things in a set and assigns it to an element on the other set.

There can't be any ambiguity.

That's not the case with any of these other graphs, right?

If I draw a vertical line here,

it intersects the right guy

at exactly one point, and it intersect the blue guy at exactly one point.

So if this is the point x, I want

to know what's the red function of value of x, there it is.

What's the blue function of the value of x? There it is. Any other vertical line,

same exact thing, it intersects the red line at one point, so there's x,

there's the red value of x and there the blue value of x.

There's that ambiguity with yellow.

So lets actually write down what the vertical line test says, any vertical line,

intersects the graph of a function once.

If it intersects it more than once,

we violate things here.

Okay, that concludes this video.