Lines

There are three major ways to express a line, which is usually considered a function of two variables, x and y:

Standard Form: Ax+By=C
Point- Slope Form: y-(Subscript[y, 0])= m(x-(Subscript[x, 0]))
Slope-Intercept Form: y=m x + b

We will focus on the slope intercept form.

(1) The intercept means the vertical (or y-axis) intercept.  Note that when x=0, y=b.  Thus the point (0,b) is on the line and also is the location of where the line intersects the y-axis.

Line1[x_]:=3*x-1;
Line2[x_]:=-2x-2;
Line3[x_]:=1/2*x+1;
Line4[x_]:=0.3*x+0.1;

Plot[{Line1[x],Line2[x],Line3[x],Line4[x]},{x,-5,5}]

Positive slope m means that the line goes up m units for every one unit to the right.

Line1[x]

Line3[x]

Plot[{Line1[x],Line3[x]},{x,-5,5}]

Negative slope m means that the line goes down -m units for every one unit to the right.

Line2[x]

Plot[{Line2[x],Line4[x]},{x,-5,5}]

As important as the vertical intercept (the y-intercept or when x=0), is the horizontal intercept (x- intercept) which is when y=0.

How do we find this intercept?  We use the Solve command!

Line1[x]==0

Solve[Line1[x]==0,x]

Plot[Line1[x],{x,-1,1}]

Line2[x]==0

Solve[Line2[x]==0,x]

Plot[Line2[x],{x,-2,2}]

Line2[x]==Line4[x]

Solve[Line2[x]==Line4[x],x]

Line2[-0.9130434782608696`]

Line4[-0.9130434782608696`]

Plot[{Line2[x],Line4[x]},{x,-2,2}]

Plot[{Line1[x],Line2[x],Line4[x]},{x,-2,2}]