Equation of the line with given x- and y-intercept 
What is the equation of the line with 5 and -3 as x- and y-intercept, respectively?

Is the answer $y = \frac{3}{5}x - 3$?
I saw an example question online but I am not entirely sure with how you do this. Can anybody help?
 A: There exists a general formula: if the  $x$ and $y$-intercepts are $a\ne 0$ and $b\ne 0$ respectively, the line has equation
$$\frac xa+\frac yb =1.$$
Apply it and rewrite it in the form $\; y=\dots$.
A: Another way to look at this is by considering the equation of any straight line to be $$y=mx+c$$ where $m$ is the gradient of the line and $c$ is the y-intercept of the line.
We are given that the $y$-intercept is $-3$ so we now know that our line has the equation $$y=mx-3$$
There are then 2 ways of finding the gradient of our line. The first is to substitute in known values of $x$ and $y$ and then solve the resulting equation. We could pick the point $(5,0)$, which is the $x$-intercept. This would give us \begin{align}y&=mx-3\\
0&=m\times 5-3\\
3&=5m\\
m&=\frac 35\end{align}
meaning that our final equation is, as you have found, $$y=\frac35x-3$$
We can also calculate the gradient from two points, using the equation $$m=\frac{y_2-y_1}{x_2-x_1}$$
Our two points are $(x_1,y_1)=(5,0)$ and $(x_2,y_2)=(0,-3)$
Putting this into the equation gives us \begin{align}m&=\frac{-3-0}{0-5}\\
&=\frac{-3}{-5}\\
&=\frac35\end{align}
which also results in the equation $$y=\frac35x-3$$
A: The equation of a line is $$y=ax+b$$
then you can find y-intercept if you let $x=0$ so here we have $b$ as y- intercept, also x-intercept which is indeed the only root of the equation can be derived by setting $y=0$, so for example here we have $$\frac{y-b}{a}=x$$
also your answer is true.
A: Derivation of Bernard's formula:
Start: $y=mx+b$, assume $a,b,m \not=0$.
1) $x=0$ gives the $y$-intercept:
$y=b$;
2) $y=0$ gives the $x$-intercept, say $a$.
$0=mx+b$; $a=-b/m$;
3) $y=mx+b=-(b/a)x+b$; 
4) $y/b+x/a=1$
