# The graph of a function $y(x)$ is a straight line in a regular coordinate system if and only if $y(x) = ax + b$?

How does one prove:

The graph of a function $y(x)$ is a straight line (no curves) in a regular coordinate system ($x,y$ coordinate system with axis' having interval $c$) if and only if $y(x) = ax + b$ ? This question might be odd. By looking at graphs of functions one can be convinced that the implication holds both ways, but how is this proven rigoursly ?

• Define "straight line" – Hagen von Eitzen Jan 20 '14 at 17:00
• A line with no curves. – Shuzheng Jan 20 '14 at 18:18
• Define "curve" :) – JiK Jan 20 '14 at 18:33

Consider the generic case of a line that intersects the $x$-axis and the $y$-axis in two distinct points $A=(a,0)$ and $B=(0,b)$ with $a,b\ne 0$. (The exceptional cases of $a=b=0$ or a line parallel to the $x$-axis [but not to the $y$-axis, why?]) are left as an exercise. Let $P$ be any point on that line. And let $Q=(x,0)$ be the point of intersection of the $x$-axis with the line parallel to the $y$-axis through $P$. Let $R=(0,y)$ be the point of intersection of the $y$-axis with the line parallel to the $x$-axis through $P$. Then by definition, $P$ has coordinates $(x,y)$. By the intercept theorem (once with center $A$, once with center $B$) $$\frac{x-a}{a}=\frac{AQ}{OA} = \frac{AP}{BA}=\frac{OR}{BO}=\frac{y}{-b}$$ and hence $$y = m x+b$$ with $m:=-\frac ba$.

The converse (i.e. that $y=mx+b$ descibes a line) is easily verified with the converse of the intercept theorem.

I don't know if this is correct or rigorous enough (I guess it is not) but, every function $y = y(x)$ defined over $x \in \mathbb{R}$ is a straight line in the $(x,y)$ plane if and only if its curvature is zero (see MJD's comment below):

$$y''(x) = 0, \quad x \in \mathbb{R},$$

then it must hold:

$$y(x) = a x + b,$$

for $a$ and $b$ constants of integration.

Cheers!

• Your condition isn't quite right (and doesn't imply the conclusion). Do you mean $y''(x)=0$? – preferred_anon Jan 20 '14 at 17:02
• Thanks for the correction Daniel. Of course I meant zero curvature, $\kappa \approx y'' = 0$. – Dmoreno Jan 20 '14 at 17:04
• Ah, fair enough – preferred_anon Jan 20 '14 at 17:06
• I would just add that the curvature of the graph of $y$ at the point $(x, y(x))$ is given by $$\kappa(x) = \left\lvert\frac{y''(x)}{\left(1+y'(x)^2\right)^{3/2}}\right\rvert$$ and we want $\kappa(x) = 0$ for every $x$, so we must have $y''(x) = 0$ everywhere. – MJD Jan 20 '14 at 17:42
• So a straight line in a coordinate system is one having curvature $= 0$ ? – Shuzheng Jan 20 '14 at 18:40

I think your questions has been adequately answered by Dmoreno's post elsewhere in this thread, but I would like to generalize it a little bit. You asked about functions where $y = y(x)$, which includes lines that are not vertical. It is possible to generalize this situation.

Let $t$ be some parameter and let $x=x(t), y=y(t)$ be functions of $t$. We can plot the set of all points $(x(t), y(t))$ for all $t$ in some range, say for all real $t$. This gives us a curve of some sort. The case where $y$ depends directly on $x$ is included as a special case of this situation, where $x(t)$ is the identity function $t$; then we are plotting $(t, y(t))$. But the parametric case also includes the special case where $x(t)$ is a constant, in which case the graph is a vertical line, as well as many other curves where $y$ is not a function of $x$. For example, the graph of $x(t) = \cos t, y(t) = \sin t$ is a circle, which is not the graph of any function $y(x)$.

We can compute the curvature of the graph for each $t$; it comes out to $$\kappa(t) = \frac{\left\lvert\dot x\ddot y - \dot y \ddot x\right\rvert}{\left(\dot x^2 + \dot y^2\right)^{3/2}}$$

where $\dot x$ and $\ddot x$ are the first and second derivatives of $x(t)$ with respect to $t$, and similarly $\dot y$ and $\ddot y$.

We would like to know when $\kappa(t)$ is identically zero. Assuming that the denominator never vanishes (which can only occur when $\dot x(t) = \dot y(t) = 0$, which for smooth curves we can avoid by changing the parameter) we want $$\dot x\ddot y - \dot y \ddot x = 0.$$

If $\dot x = 0$ then $y$ can be anything, but then $x(t)$ is constant and the graph is vertical line. Similarly if $\dot y=0$ we have a horizontal line. So suppose neither $\dot x$ nor $\dot y$ is identically zero. Then we can divide by $\dot x \dot y$ to get:

$$\frac{\ddot x}{\dot x} - \frac{\ddot y}{\dot y} = 0.$$

Integrating both sides with respect to $t$ gives $$\ln{\dot x} - \ln{\dot y} = C\\ \ln\left(\frac{\dot x}{\dot y}\right) = C\\ \dot x = a\dot y$$ where $a = e^C$.

Integrating again, we have $$x = ay+b$$ as the only solution when neither $\dot x$ nor $\dot y$ is zero. So the only solutions are lines.