Brain Dump

Straight Line

Tags
math

A straight line is an equation of the form \( y = mx + c \), where \( m \) is the gradient of the line and \( c \) is the point where the line meets the x-axis (when \( x = 0 \)).

We can define the gradient from any 2 points on the line by using the formula \[ m = \frac{y_2 - y_1}{x_2 - x_1} \]

Line Construction

If we know the gradient, \( m \), of a straight line we want to create and have a point, \( (x_1, y_1) \) on that line, we can define a straight line equation for it:

\begin{align} \label{eq:straight-line-create} y - y_1 = m(x - x_1) \end{align}

Midpoint Between Two Locations on the Line

For two points on a straight line we can find their mid-point as:

\begin{align} (\frac{x_1+x_2}{2}, \frac{y_1+y_2}{2}) \end{align}

Perpendicularity Property

If two straight lines are perpendicular (they meet at right angles), then the product of their gradients is \( -1 \); \( m_1 \times m_2 = -1 \).

Using this fact and eq:straight-line-create we can create a line perpendicular to a line we know by using \( m_2 = \frac{-1}{m_1} \) and specifying which point on the line we want to intersect with our new line.