Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Very, very basic question here: Given an x,y coordinate and a gradient (but no equation), how can I find the x and y axis intercepts? (assuming the line is linear)

share|cite|improve this question
I changed the tag because I don't consider this "linear algebra". – quanta May 13 '11 at 17:09

Let $P\left( X,Y\right) $ be the given point (I changed the notation from $(x,y)$). The equation of a straight line is

$$y=mx+b,\qquad (1)$$

where $m$ is the slope (or gradient) and $b$ is the value of $y$ for $x=0$ (in another words, $b$ is the $y$ axis intercept).

Now we use the information that the line passes through $P$. The $\left( X,Y\right) $ coordinates must satisfy $(1)$. Hence

$$Y=mX+b.\qquad (2)$$

Subtracting $(2)$ from $(1)$, we get

$$y-Y=mx+b-\left( mX+b\right), $$

which is equivalent to

$$y-Y=m(x-X)\qquad (3)$$

and to

$$y=mx-mX+Y.\qquad (4)$$

To find the $y$ axis intercept we can solve $(2)$ for $b$:

$$b=Y-mX.\qquad (5)$$

To find the $x$ axis intercept we make $y=0$ in $(4)$ and solve it for $x$:

$$0=mx-mX+Y\Leftrightarrow mx=mX-Y\Leftrightarrow x=X-\frac{Y}{m}=:a.\qquad (5)$$

So $A(X-\frac{Y}{m},0)=(a,0)$ and $B(0,Y-mX)=(0,b)$ are, respectively, the points of intersection of the line with the $x$ and $y$ axes.

Equations $(1)$and $(3)$ are equivalent. Another equivalent one is the following equation in terms of $a$ and $b$:

$$\frac{x}{a}+\frac{y}{b}=1.\qquad (6)$$

Example: $m=2,X=1,Y=4$. The line is $y=2x+2$ and the points of intersection are $A(-1,0)$, $B(0,2)$.

enter image description here

$$m=2,(X,Y)=(1,4),\quad a=-1,b=2$$

share|cite|improve this answer

You are given a point $(x_l,y_l)$ on a line with gradient $m$ and want to find out what value of $t$ such that $(t,0)$ lines on the line (and the same problem for $y$),

so when are both $(x_l,y_l)$ and $(t,0)$ on a line with gradient $m$? It is exactly when $\frac{x_l-t}{y_l-0} = m$, by algebra this gives $t = x_l - m y_l$.

share|cite|improve this answer
typo in $m$, $m=\dfrac{y_l}{x_l-t}$. – Américo Tavares Jul 9 '11 at 23:15
my comment was addressed to you but @ did't appear. – Américo Tavares Jul 9 '11 at 23:40

OP seems to have abandoned this question, but I want to put a good word in for the point-slope form of the equation of a line. Let the given point be $(a,b)$, the given slope, $m$. Then the point-slope form of the equation of the line is $$y-a=m(x-b)$$ Now if you want the $y$-intercept, you let $x=0$ and solve $y-a=m(0-b)$ for $y$; if you want the $x$-intercept you let $y=0$ and solve $0-a=m(x-b)$ for $x$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.