# How is $Ax + By = C$ the equation of a straight line?

I know the equation, $y = mx + b$ where $m$ is slope and $b$ is $y$-intercept, is a straight line. But I know also that $Ax + By = C$ is a straight line equation, but how does it represent a straight line?

-

It is possible to think about $Ax+By=C$ in a few ways. As in other answers, you can rewrite it either in the form $x=k$ or in the form $y=mx+b$.

If you know about vectors, you can think of the vector $\langle A,B\rangle$ as being some vector orthogonal (perpendicular) to the line and $C=\langle A,B\rangle\cdot\langle x_0,y_0\rangle$ for any given point $(x_0,y_0)$ on the line (see my answer here for more details on this idea).

If $A=0$ or $B=0$, then the equation describes a vertical or horizontal line, since it says that $y$ or $x$ is a constant. Given that, from here on, let's assume that $A,B\neq 0$.

As $x$ decreases by $\frac{1}{A}$, $y$ has to increase by $\frac{1}{B}$ to keep the sum $Ax+By$ constantly equal to $C$ (and vice versa if $x$ increases). Since the change in $y$ is constant for a constant change in $x$, the relationship between $x$ and $y$ is linear.

In terms of graphing from $Ax+By=C$ form, let $x=0$ so that $By=C$ or $y=\frac{C}{B}$, to get that $(0,\frac{C}{B})$ is the $y$-intercept. Similarly, $(\frac{C}{A},0)$ is the $x$-intercept. Plotting these two points and drawing the unique line through them gives the graph of $Ax+By=C$.

-

If you solve for $y$ in $Ax+By = C$ ($B \neq 0$) you get slope-intercept form. In other words, $$By = C-Ax$$ $$y = \frac{C}{B}-\frac{Ax}{B}$$ so that $m = -A/B$ and $b = C/B$ in $y = mx+b$.

As Gonzalo points out, if $B = 0$ then we get $Ax = C$ or $x = C/A$ which is a line parallel to the $y$-axis through the point $(C/A,0)$.

-
Don't forget to consider the case $B=0$. – Gonzalo Medina Mar 14 '11 at 2:05

If $B=0$ and $A\neq 0$, then the equation is simply $x=C/A$, which is a straight line parallel to the $y$-axis passing through the point $(C/A,0)$; if $B\neq 0$, then you can rewrite $Ax+By=C$ as $y=\dfrac{-A}{B}x+\dfrac{C}{B}$ which is a straight line with slope $\dfrac{-A}{B}$ and $y$-intercept $\dfrac{C}{B}$.

-