I'm currently in Pre-Calculus (High School), and I have a relatively simple question that crossed my mind earlier today. If I were to take a graph and draw a random line of any finite length, in which no two points along this line had the same $x$ coordinate, would there be some function that could represent this line? If so, is there a way we can prove this?
-
2"Line" means "straight line", right? – bof Mar 19 '16 at 00:04
-
@bof Correct, although now that you mention it, I wonder if this same principle would apply to any line. – Nick Mar 19 '16 at 00:10
3 Answers
As an aside to supplement the answers you have already gotten, I would like to point out that a function doesn't need to have a formula to be considered a function. This is because a function is just a relation between two sets (the domain and range), with the property that you get only a single output for each input (this is the rule that there can only be one $y$ value for each $x$ value).
For instance, I can define a function $f$ from the set $\{0,1,2\}$ to the set $\{5,10,15\}$ by giving the rules
$$f(0)=10 \\f(1)=5 \\f(2)=15$$
It might be difficult or impossible to find a formula for $f$ in which you can plug in $0$, $1$, or $2$ and get the correct answer as a result, yet $f$ is a function since each input gives me a unique result.
By the same token, you can draw a straight line, or a wiggly line, a line with holes in it, or just a bunch of points, etc, and as long as you have ensured that there is no point on the graph where a single $x$ value gives more than one $y$ value you have essentially defined a function. This is true whether you can find a formula for it or not.
- 3,960
- 3,748
-
So I could define a function just by stating two sets of any length, even if I have no equation that relates these two sets? I thought the function was the actual equation in which you can plug in a point from set x and get a corresponding point in set y. If not, then what do we call the actual equation (if one exists)? – Nick Mar 19 '16 at 00:23
-
@Nick It's not necessary to have a single equation to express the entire function. A natural step up from your original question about lines is to look at step functions (pun not intended): https://en.wikipedia.org/wiki/Step_function – Irregular User Mar 19 '16 at 00:26
-
@Nick The function is the rule that describes what number you will get out for any given number you put in. Sometimes (mostly always when you first start learning about functions) the rules are really nice and they can be described in one single equation, but it doesn't need to be the case. We regularly refer to the equation itself (when there is one) as the function, and it is not incorrect to say this. I just wanted to point out that some functions cannot be expressed with equations. – Symmetry Mar 19 '16 at 00:41
-
@wgrenard isn't it possible to find a polynomial with real coefficients for the said points using interpolation? – jermenkoo Mar 19 '16 at 03:13
-
A function is any mapping that maps each point in a domain to a value. The values don't have have any rationale or reason. Someone can define a function by rolling dice for each input value (except if the domain is all the. Real numbers you can't actually roll the dice for each real number one after the other as the reals are uncountable. But that's not the point. The point is the function itself can be totally arbitrary.) – fleablood Mar 19 '16 at 03:39
-
"each point in a domain": Nick do not think that means all real numbers or something like that, the domain for which the function maps "each point" is simply the domain of all points for which the function is defined. – Law29 Mar 19 '16 at 10:18
-
Yes. If the two end points of the line are $(x_1,y_1)$ and $(x_2,y_2)$ then the function is $f:[x_1,x_2]\to \mathbb R$ defined by $f(x)=\frac{y_2-y_1}{x_2-x_1}(x-x_1)+y_1$.
-
1Ah, I suppose I should have realized this. So your saying you could just find the slope of any random line, and use point-slope formula to construct a function? – Nick Mar 18 '16 at 23:54
-
1@Nick: Precisely. The only problem is when $x_1=x_2$ above. Can you guess what the problem is? – Mar 18 '16 at 23:55
-
The denominator of the slope formula would be 0 when x base 2 is equal to x base 1 by the inverse property of addition, therefor making the function undefined. Am I correct? – Nick Mar 18 '16 at 23:58
-
@Nick: Yes you are right. Hence the problem lies when there is the same $x$ coordinate and not when there is the same $y$-coordinate (excepting the trivial case when $x_1=x_2=y_1=y_2=0$). – Mar 19 '16 at 00:00
-
If I could ask one more question that would be great. I was also wondering if this truth could be extended to higher degree functions: What if I were to draw any random parabolic curve or shape on a graph. Would there be some polynomial function that could model this line exactly? Is this true for any curvy line I draw, as long as no x coordinate repeats? – Nick Mar 19 '16 at 00:08
-
@Nick When you say higher degree functions, do you mean functions such as $f: \mathbb{R}^n \rightarrow \mathbb{R}^m$ or functions given by some high degree polynomial $a_nx^n + a_{n-1}x^{n-1} + \dots a_1x + a_0$? – Irregular User Mar 19 '16 at 00:11
-
@Nick: No it is not true. Roughly because the set of all polynomials is "smaller" then the set of these functions and so only a limited number of curves can be modeled in this way. For more details you should ask a separate question. – Mar 19 '16 at 00:11
-
@Nick It is in a sense true: to every function on the reals there is a "graph of the function": an idealised drawing of the function. Also to every graph there corresponds a function, but that function need not be polynomial. The curvy line doesn't even need to be "continuous" - you can lift your pencil off the paper and put it down again somewhere else while drawing it. While most functions you've dealt with are nice safe ones, there are very many really weird functions out there, which you haven't got a hope of physically drawing because they're so weird. – Patrick Stevens Mar 19 '16 at 00:12
-
@Shahab Ok, thanks for the help. I feel like I have a deeper understanding of functions now. – Nick Mar 19 '16 at 00:12
-
@Irregular User I meant functions given by some higher degree polynomial, for example $ax^{2} + bx + c$ – Nick Mar 19 '16 at 00:16
-
Any curve where each x value has only one y value (but each y value can have 0, 1, many, even infinite x values) is a function but such a function might not be "nice" and have a rule. Given a finite number of points you can find polynomials that fit those finite number of points. – fleablood Mar 19 '16 at 03:57
-
Nitpick. The two points can be any two points. Not just the two endpoints of a segment. – fleablood Mar 19 '16 at 03:58
The only straight lines in the $x$-$y$ plane that are not functions are those that are perfectly vertical. Those are of the form $x=c$, where $c$ is a constant.
All other lines can be expressed in the form $y =f (x)= mx + b$ where $m $ is the slope of the line and $b $ is the $y$-intercept-- the $y$ value when $x$ is $0$.
Given any two points on the line we can find this formula, and given its formula we can find any point on the line.
Such a function is called a linear function.
- 3,960
- 130,341