## Lines

A line, by definition, is a curve that geometrically is determined by two of its points. Our discussion here is on straight (linear) lines. A linear line is a one-dimensional construct: it has length. As such, a linear line can exist in any coordinate system with one or more dimensions (we can probably interpret this to mean that a linear line can exist in any coordinate system, since a dimensionless coordinate system is non-existent.)

### General Form of a Line

In plane geometry, a line is a set of points satisfying a linear equation of the form:

$$ax+by+c=0$$

Where $$a$$ and $$b$$ are not both zero.

In Cartesian coordintes, the equation of a straight line may take various standard forms, all of which are special cases of the general form.

### Standard Form/Slope-Intercept Form

A line with the equation:

$$y=mx+b$$

has a gradient (slope) of $$m$$ and an intercept of $$b$$ on the y-axis. For instance, the line $$y=3x+5$$ has a gradient of 3 (the angle between the line and the x-axis is $$tan^{-1}\,3$$), and it cuts the y-axis at point (0,5). Basically, this equation says that for every 3 units we move to the right along the x-axis, we move 5 units upward on the y-axis.

A plot of the line $$y=3x+5$$ shows the intercepts at (-3,0) and (0,5).

The slope of the line is calculated as:

$$m=\frac{Δy}{Δx}=\frac{y_2-y_1}{x_2-x_1}$$

#### Notes:

The angle between two lines with slopes $$m_1$$ and $$m_2$$ is:

$$α=tan^{-1}\big[\frac{m_2-m_1}{1+m_2m_1}\big]$$

Two lines are parallel if:

$$m_1=m_2$$

Two lines are perpendicular if:

$$m_1=-\frac{1}{m_2}$$

### Intercept Form of a Line

A line with an equation of the form:

$$\frac{x}{a}+\frac{y}{b}=1$$

intercepts the x-axis at $$(a,0)$$ and the y-axis at $$(0,b)$$. For example, the line $$3y=2x-6$$ can be put in the form:

$$\frac{x}{3}+\frac{y}{2}=1$$

The intercept on the x-axis is 3 and the intercept on the y-axis is -2.

### Point-Slope Form of a Line

A line with a slope $$m$$ passing through a known point $$(x_1,y_1)$$ has the equation:

$$y-y_1=m(x-x_1)$$

For example, a line with a gradient of 2 passing through the point (5,4) gives:

$$y-4=2(x-5)$$

Which can be rearranged to give:

$$y=2x-6$$

### Two-Point Form of a Line

A line passing through two known points $$(x_1,y_1)$$ and $$(x_2,y_2)$$ has an equation of the form:

$$\frac{x-x_1}{x_2-x_1}=\frac{y-y_1}{y_2-y_1}$$

For example, a line passing through the points (3,2) and (-5,4) has the equation:

$$\frac{x-3}{-5-3}=\frac{y-2}{4-2}$$ → $$\frac{x-3}{-8}=\frac{y-2}{2}$$

Which, after rearranging gives:

$$-4y=x-5$$or$$y=-\frac{1}{4}x+20$$

## Lines in Space

### General Form of a Spacial Line

The general form of a line in space is given by the equation:

$$Ax+By+Cz+D=0$$

The line can be written in many other forms, which are all variations of the general form.

### Symmetrical Form a Spacial Line (Standard Form)

The equation is written in terms of direction numbers {$$l,m,n$$} and a point on the line $$(x_1,y_1,z_1)$$:

$$\frac{x-x_1}{l}=\frac{y-y_1}{m}=\frac{z-z_1}{n}$$

### Two-Point Form of a Spacial Line

The equation is written in terms of two points on the line with coordinates $$(x_1,y_1,z_1)$$ and $$(x_2,y_2,z_2)$$. It has the form:

$$\frac{x-x_1}{x_2-x_1}=\frac{y-y_1}{y_2-y_1}=\frac{z-z_1}{z_2-z_1}$$

### Parametric Form of a Spacial Line

The line is descibed in terms of its direction cosines $$\{l,m,n\}$$, a point on the line $$(x_1,y_1,z_1)$$, and a variable parameter $$d$$, which specifies the distance of the variable point $$(x,y,z)$$ from point $$(x_1,y_1,z_1)$$.

$$x=x_1+ld$$
$$y=y_1+md$$
$$z=z_1+nd$$