# Vectors

## Scalars

The graph below shows three vectors which all share the same scalar component. Adjust the slider at the top of the graph to change the scalar value. The definition for each vector is displayed beneath the graph.

$\vec{v1} =$ s$\begin{bmatrix}-0.75\\ 0.25\end{bmatrix}$
$\vec{v2} =$ s$\begin{bmatrix}0.75\\ -0.25\end{bmatrix}$
$\vec{v3} =$ s$\begin{bmatrix}0.25\\ 0.75\end{bmatrix}$

Drag the ends of the two black vectors to change their direction and magnitude. The blue vector shows the result of adding the two black vectors together.

## Subtraction

Drag the ends of the two black vectors to change their direction and magnitude. The green vector shows the result of subtracting v1 from v2.

## Dot Product

$\vec{a}.\vec{b} = |\vec{a}| |\vec{b}| cos\theta$

$\vec{a}.\vec{b} = \vec{a}_1*\vec{b}_1 + \vec{a}_2*\vec{b}_2$

Drag the ends of the two vectors to change their direction and magnitude. The blue line shows the component of $\vec{b}$ in the direction of $\vec{a}$, which is $\frac{\vec{a}.\vec{b}}{|\vec{a}|}$, or equivalently, $|\vec{b}| cos\Theta$

$\vec{a}.\vec{b} =$a$*$b$* cos($Θ$) =$ 0

$\vec{a}.\vec{b} =$a1$*$b1$+$a1$*$b2$=$ 0

## Equation of a Line

$\vec{r} = \vec{a} + t\vec{d}$

$y = mx + c$

Drag the two black and white points to modify the vectors $a$ and $d$ which describe the red line, use the slider to change the scalar value ($t$).