2
$\begingroup$

In a straight line equation $y = mx + b$ if I have $m$ and $x$ how can I get $b$ (where the line cross the Y axis)?

I search on the internet they said to get it by drawing it and see where it cross the Y axis, and this not possible since the numbers am dealing with is very large.

  • 2
    @Swaiss: Your problem with two points is not what you described previously. Just knowing $m$ and a value of $x$ would not tell you much: Every value of $x$ will be part of a solution to an equation with a given $m$. But with two points, we're getting somewhere. If you know how to find $m$, and you also know a particular solution $(x,y)$, which can be given by either of your two points, plug in those three numbers into the equation $y=mx+b$ to leave $b$ as the only unknown, then solve. See also http://www.purplemath.com/modules/strtlneq.htm2012-10-30

1 Answers 1

2

It looks like you have two points $(x_1,y_1)$ and $(x_2,y_2)$ so you can set up two simultaneous equations

$y_1=mx_1+b$$y_2=mx_2+b$Multiply the first by $x_2$ and the second by $x_1$

$y_1x_2=mx_1x_2+bx_2$$y_2x_1=mx_1x_2+bx_1$subtract:$y_1x_2-y_2x_1=b(x_2-x_1)$ and go from there.

You might also like to investigate the form:$y=y_1\frac{(x-x_2)}{(x_1-x_2)}+y_2\frac{(x-x_1)}{(x_2-x_1)}$ which is a direct way of writing the equation of a line through two points. The form can be developed to give the equation of a quadratic through three points, and generally the lowest degree curve through $n$ points.

  • 1
    You could also get the slope $m$ from $m = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}$, and then use either equation to get $b$.2012-10-30