Equation of a Line

Standard

\begin{eqnarray*}
Ax + By + C &=& 0
\end{eqnarray*}

where:

  • the slope of the line is $-\frac{A}{B}$
  • the y-intercept is $-\frac{C}{B}$

Given two points $P_{1}$ and $P_{2}$ on the line, we can write that:

\begin{eqnarray*}
A &=& y_{1}-y_{2} \\
B &=& x_{2}-x_{1} \\
C &=& x_{1}y_{2}-x_{2}y_{1}
\end{eqnarray*}

in order to determine $A$, $B$ and $C$.

Slope-Intercept


\begin{tikzpicture}

  % grid
  \draw[help lines] (-2,-2) grid (2,2);
  
  % origin
  \draw[red, line width=.1mm] (-0.1,-0.1) -- (0.1,0.1)
    (0.1,-0.1) -- (-0.1,0.1);
  \coordinate[label={[red]above left:$O$}] (O) at (0,0);
  
  \coordinate[label={[red]above left:$A$}] (A) at (-2,0);
  \drawpoint{A}{.5mm}{black}
  \coordinate[label={[red]above left:$B$}] (B) at (2,1);
  \drawpoint{B}{.5mm}{black}
  
  \draw (A) -- (B);
  
  \coordinate (C) at (2,0);
  \coordinate (D) at (0,1);
  
  \draw[dotted,->] (O) --  (C) node[below] {$x$};
  \draw[dotted,->] (O) --  (D) node[left] {$y$};
  
  \markangle{A}{B}{C}{3mm}{3mm}{$\alpha$}{cyan}{north}
  
\end{tikzpicture}

\begin{eqnarray*}
y &=& {\color{cyan}m}x + b & \\
\end{eqnarray*}

where ${\color{cyan}m}$ is the slope:

\begin{eqnarray*}
{\color{cyan}m} &=& \tan{{\color{blue}\alpha}}
\end{eqnarray*}

where ${\color{blue}\alpha}$ is the angle between the line and the $\overline{Oy}$ axis.

${\color{cyan}m}$ can also be expressed parametrically as:

\begin{eqnarray*}
{\color{cyan}m} &=& \frac{y_{2}-y_{1}}{x_{2}-x_{1}}
\end{eqnarray*}

where $x_{1}, x_{2}, y_{1}, y_{2}$ are the components of the points $A(x_{1}, y_{1})$ and $B(x_{2}, y_{2})$ of the line.

Point-Slope

Given two points $A(x_{1}, y_{1})$ and $B(x_{2}, y_{2})$ and a connecting line $\overline{AB}$, the point-intercept form of the line is given by:

\begin{eqnarray*}
y - y_{1} &=& m(x - x_{1})
\end{eqnarray*}

where $m$ is the slope of the line.

Parametric Form

In parametric form:

\begin{eqnarray*}
P &=& P_{0} + t(P_{1} - P_{0})
\end{eqnarray*}

where:

  • $P$ is a generic point on the line.
  • $P_{0}$ is the starting point of the line segment.
  • $P_{1}$ is the end point of the line segment.
  • $t$ is a parameter with $t: \mathbb{R} \mapsto [0, 1]$ where by taking values and working out the equation yields points on the line.

Midpoint of a Segment


\begin{tikzpicture}

  % grid
  \draw[help lines] (-2,-2) grid (2,2);
  
  % origin
  \draw[black, line width=.1mm] (-0.1,-0.1) -- (0.1,0.1)
    (0.1,-0.1) -- (-0.1,0.1);
  \coordinate[label={[black]below left:$O$}] (O) at (0,0);
  
  \coordinate[label={[green]above left:$A(x_{1}, y_{1}, z_{1})$}] (A) at (-2,0);
  \drawpoint{A}{.5mm}{black}
  \coordinate[label={[blue]above left:$B(x_{2}, y_{2}, z_{2})$}] (B) at (2,1);
  \drawpoint{B}{.5mm}{black}
  
  \draw (A) -- (B);
  
  \coordinate[label={[red]above left:$M$}] (M) at (0,0.5);
  \drawpoint{M}{.5mm}{red}
  
  \coordinate (C) at (2,0);
  \coordinate (D) at (0,2);

  \draw[dotted,->] (O) --  (C) node[below] {$x$};
  \draw[dotted,->] (O) --  (D) node[left] {$y$};
  
  %\markangle{A}{B}{C}{3mm}{3mm}{$\alpha$}{cyan}{north}
  
\end{tikzpicture}

Knowing the components of two points $A$ and $B$, we can determine the midpoint $\color{red} M$ of the segment $\overline{AB}$ whose components are:

\begin{eqnarray*}
\color{red} x_{M} &=& \frac{{\color{green}x_{1}}+{\color{blue}x_{2}}}{2} \\
\color{red} y_{M} &=& \frac{{\color{green}y_{1}}+{\color{blue}y_{2}}}{2} \\
\color{red} z_{M} &=& \frac{{\color{green}z_{1}}+{\color{blue}z_{2}}}{2} \\
\end{eqnarray*}


fuss/mathematics/geometry/shapes/lines.txt ยท Last modified: 2017/02/22 18:30 (external edit)

Access website using Tor Access website using i2p


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.