> For the complete documentation index, see [llms.txt](https://jamesbrayy.gitbook.io/atar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jamesbrayy.gitbook.io/atar/specialist/vectors.md).

# vectors

***

## **basics**

* $$d = \sqrt{(x\_2 - x\_1)^2 + (y\_2 - y\_1)^2 + (z\_2 - z\_1)^2}$$
* $$\text{midpoint} = \left(\frac{x\_1+x\_2}{2}, \frac{y\_1+y\_2}{2}, \frac{z\_1+z\_2}{2}\right)$$
* $$\mathrm{vector:proj}\_{\underset{\sim}{b}}\underset{\sim}{a} = (\underset{\sim}{a} \cdot \hat{\underset{\sim}{b}}),\hat{\underset{\sim}{b}}$$

![](/files/A2TAp8ChrwylnOUXE2Qf)

## **cross product**

for vectors $$\underset{\sim}{{a}}$$ and $$\underset{\sim}{{b}}$$, the cross product $$\underset{\sim}{{a}}\times \underset{\sim}{{b}}$$ is a vector perpendicular to $$\underset{\sim}{{a}}$$ and $$\underset{\sim}{{b}}$$

* *i.e.* it is normal to the plane containing $$\underset{\sim}{{a}}$$ and $$\underset{\sim}{{b}}$$ $$\left|\underset{\sim}{{a}}\times \underset{\sim}{{b}}\right|=\left|\underset{\sim}{{a}}\right|\left|\underset{\sim}{{b}}\right|\mathrm{sin}\mathit{\theta}$$, where $$\theta$$is the angle between $$\underset{\sim}{{a}}$$ and $$\underset{\sim}{{b}}$$
* this also gives the area bounded by the parallelogram formed from $$\underset{\sim}{{a}}$$ and $$\underset{\sim}{{b}}$$

#### *manually calculating cross product*

![](/files/MOVmsWBoLmCS3bSclRrK)

## **lines**

consider a line passing through $$\left(\begin{array}{c}2\ -1\ 3\end{array}\right)$$ and parallel to $$\left(\begin{array}{c}1\ 2\ 3\end{array}\right)$$

#### *vector equation:*

$$
\underset{\sim}{{r}} = \left(\begin{array}{c}2\ -1\ 3\end{array}\right) + \lambda \left(\begin{array}{c}1\ 2\ 3\end{array}\right)
$$

#### *parametric equation:*

$$
\begin{aligned}
x &= 2 + \lambda \\
y &= -1 + 2\lambda \\
z &= 3 + 3\lambda
\end{aligned}
$$

#### *cartesian equation:*

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

## **planes**

consider a plane passing through position vector $$\underset{\sim}{{a}}$$ and containing two non-parallel vectors $$\underset{\sim}{{b}}$$ and $$\underset{\sim}{{c}}$$

#### *vector equation:*

$$\underset{\sim}{{r}} = \underset{\sim}{{a}} + \lambda \underset{\sim}{{b}} + \mu \underset{\sim}{{c}}$$

![](/files/pjUkm6vJYelVhkkIr60Y)

#### *cartesian equation:*

$$\begin{aligned} (\underset{\sim}{{r}} - \underset{\sim}{{a}})\cdot \underset{\sim}{{n}} &= 0 \ \Rightarrow \underset{\sim}{{r}} \cdot \underset{\sim}{{n}} &= \underset{\sim}{{a}} \cdot \underset{\sim}{{n}} \ n\_1 x + n\_2 y + n\_3 z &= k \end{aligned}$$

![](/files/85NJ7vRiOrdGGqhfDYIt)

## **spheres**

#### *vector equation:*

$$|\underset{\sim}{{r}} - \underset{\sim}{{c}}| = r$$

where:

* $$r$$ is the radius
* $$\underset{\sim}{{c}}$$ is the position vector of the centre

![](/files/YhBIOohnI7ufCdijUbiL)

#### *cartesian equation:*

$$(x-a)^2 + (y-b)^2 + (z-c)^2 = r^2$$

where:

* $$r$$ is the radius
* $$\left(\begin{array}{c}a\ b\ c\end{array}\right)$$ is the position vector of the centre

## **systems of linear equations**

#### \* *gaussian elimination*

1. form an augmented matrix from equations

![](/files/k5EE2ZeWHLho8p6BBE8a)

2. conduct forward elimination

* choose a pivot entry and eliminate all entries below the pivot by replacing rows
* repeat for each column until the matrix is in row echelon form

![](/files/J96WRbwtl6JTsdEWtSRl)

3. conduct back-substitution to solve for variables

![](/files/RjxaAsOdRExwl9NhIqd4)

* note that cases 1,2, and 3 have no simultaneous solution as no point lies on all three planes at once

#### *intersecting planes*

1. three parallel planes
   * all 3 normals are parallel (multiples of each other)
   * the constants at the end of the cartesian equation distinguish the planes
2. two planes parallel and one intersecting
   * two normals are parallel while one isn’t
3. planes intersecting in pairs of parallel lines
   * all 3 normals are non-parallel
   * one normal is a linear combination of the other two
4. planes intersecting in a line
   * one plane is a linear combination of the other planes
   * all 3 normals are non-parallel
5. planes intersecting at a point
   * if the triple scalar product of the normals does not equal zero, there is a single point of intersection
   * *i.e.* $${\underset{\sim}{n}}*{1}\cdot \left({\underset{\sim}{n}}*{2}\times {{\underset{\sim}{n}}\_{3}}\right)\ne 0$$
   * note that cases 1,2, and 3 have no simultaneous solution as no point lies on all three planes at once

## **closest distance**

#### *line to point:*

![](/files/7eQLbyq3gXx9l59vxGFN)

#### *plane to point:*

![](/files/jWgmpz43jUeqk9z7pWHH)

#### *line to line:*

![](/files/MxtIaBqbar7pUO9VmGsD)
