2
$\begingroup$

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)

  • 1
    I changed the tag because I don't consider this "linear algebra".2011-05-13

3 Answers 3

2

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$

0

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$.

  • 0
    my comment was addressed to you but @ did't appear.2011-07-09
0

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$.