# Precalculus

## Analytic Geometry # Vector Coordinates

## Coordinates of a Vector in Space

Let a, b, c be an arbitrary basis in space, i.e. an arbitrary triple of non-coplanar vectors. Then, by the definition of a basis, for any vector d there are real numbers λ, μ, ν such that the following expansion holds:

$\mathbf{d} = \lambda\mathbf{a} + \mu\mathbf{b} + \nu\mathbf{c}$

The numbers λ, μ, ν are called the coordinates of the vector d with respect to the ordered basis a, b, c.

It can be proved that the coordinates of a vector d with respect to the basis a, b, c are uniquely determined.

When adding two vectors d1 and d2, their coordinates with respect to any basis ABC are added. So if

$\mathbf{d}_1 = \lambda_1\mathbf{a} + \mu_1\mathbf{b} + \nu_1\mathbf{c},\;\;\mathbf{d}_2 = \lambda_2\mathbf{a} + \mu_2\mathbf{b} + \nu_2\mathbf{c},$

then

$\mathbf{d}_1 + \mathbf{d}_2 = \left({\lambda_1 + \lambda_2}\right)\mathbf{a} + \left({\mu_1 + \mu_2}\right)\mathbf{b} + \left({\nu_1 + \nu_2}\right)\mathbf{c}$

When multiplying the vector d by any number α, all its coordinates are multiplied by this number:

$\alpha\mathbf{d} = \left({\alpha\lambda}\right)\mathbf{a} + \left({\alpha\mu}\right)\mathbf{b} + \left({\alpha\nu}\right)\mathbf{c}$

Affine coordinates in three-dimensional space are defined by setting a basis a, b, c and some point O called the origin.

Affine coordinates of any point M are the coordinates of the vector OM relative to the basis a, b, c. Since each vector OM can be decomposed in a unique way onto a basis, then each point M in space is uniquely determined by a triple of affine coordinates λ, μ, ν.

## Projection of a Vector onto an Axis

Let vector b define some axis $$\ell$$ in space. Consider the vector a and denote by the letters A1, B1 the points of intersection of the perpendiculars dropped to the $$\ell-$$axis from points A and B, respectively.

The scalar projection of the vector a = AB on the $$\ell-$$axis is called the value (magnitude) of the directed line segment A1B1 of the $$\ell-$$axis. The scalar projection is equal to the length of the line segment A1B1. It has a positive sign if the direction of the segment coincides with the vector b, and a negative sign if its direction is opposite to b.

We will denote the projection of the vector a on the $$\ell-$$axis as $$\text{proj}_\ell \mathbf{a}.$$ It follows from the above that

$\text{proj}_\ell \mathbf{a} = \text{proj}_\mathbf{b} \mathbf{a} = \pm\Vert{A_1 B_1}\Vert$

The angle between the vector a and the $$\ell-$$axis can be defined as the angle $$\varphi$$ between two rays emerging from the same point, one of which has a direction coinciding with the direction of the vector a and the other has a direction coinciding with the $$\ell-$$axis.

The projection of the vector a on the $$\ell-$$axis is equal to the length of the vector a multiplied by the cosine of the angle $$\varphi$$ between the vector a and the $$\ell-$$axis:

$\text{proj}_\ell \mathbf{a} = \Vert{\mathbf{a}}\Vert\cos\varphi$

## Cartesian Coordinates of a Vector

In the case of a Cartesian (rectangular) coordinate system, the basis vectors are usually denoted by the letters i, j, k. Each of the vectors i, j, k has a length equal to one, and these three vectors are mutually orthogonal. Usually the directions of vectors i, j, k coincide with the $$x-,$$ $$y-,$$ and $$z-$$axis directions, respectively.

The Cartesian coordinate system is a special case of the affine system and retains all its properties. Each vector d can be decomposed on a Cartesian basis i, j, k in a unique way, that is, for each vector d there exist three numbers X, Y, and Z such that the following equality is true:

$\mathbf{d} = X\mathbf{i} + Y\mathbf{j} + Z\mathbf{k}$

The numbers X, Y, and Z are called the Cartesian coordinates of the vector d. The Cartesian coordinates X, Y, and Z of the vector d are equal to the projections of this vector on the $$x-,$$ $$y-,$$ and $$z-$$axis, respectively. So we can write

$X = \text{proj}_x \mathbf{d},\;Y = \text{proj}_y \mathbf{d},\;Z = \text{proj}_z \mathbf{d}$

We will denote the coordinates of a vector in parentheses as $$\left({X, Y, Z}\right)$$ or in matrix form as a row vector $$\left[{X, Y, Z}\right]$$ or as a column vector $$\left[\begin{array}{*{20}{c}} X\\ Y\\ Z \end{array} \right].$$

Let α, β and γ be the angles between the vector d and the $$x-,$$ $$y-,$$ and $$z-$$axis. Three numbers $$\cos\alpha,$$ $$\cos\beta,$$ and $$\cos\gamma$$ are called the direction cosines of the vector d. It follows from the above that

$X = \Vert{\mathbf{d}}\Vert\cos\alpha,\;\;Y = \Vert{\mathbf{d}}\Vert\cos\beta,\;\;Z = \Vert{\mathbf{d}}\Vert\cos\gamma$

Since the coordinate system is rectangular, then

$\Vert{\mathbf{d}}\Vert = \sqrt{X^2 + Y^2 + Z^2}$

From here we get the following expressions for the direction cosines:

$\cos\alpha = \frac{X}{\sqrt{X^2 + Y^2 + Z^2}},\;\cos\beta = \frac{Y}{\sqrt{X^2 + Y^2 + Z^2}},\;\cos\gamma = \frac{Z}{\sqrt{X^2 + Y^2 + Z^2}}$

This means that the sum of the squares of the direction cosines of any vector is equal to one:

$\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1$

## Solved Problems

### Example 1.

Given three vectors $$\mathbf{a}\left({-1,-2}\right),$$ $$\mathbf{b}\left({0,3}\right),$$ $$\mathbf{c}\left({4,-2}\right).$$ Find the coordinates of the vector $$3\mathbf{a} + 2\mathbf{b} + \mathbf{c}.$$

Solution.

We know that if a vector is multiplied by a number, then each its coordinate is multiplied by that number. Similarly, when we add or subtract vectors, we add or subtract the corresponding coordinates by pairs. When performing these operations it is convenient to represent vectors in matrix form. This yields:

$3\mathbf{a} + 2\mathbf{b} + \mathbf{c} = 3\left[\begin{array}{*{20}{c}} -1\\ -2 \end{array} \right] + 2\left[\begin{array}{*{20}{c}} 0\\ 3 \end{array} \right] + \left[\begin{array}{*{20}{c}} 4\\ -2 \end{array} \right] = \left[\begin{array}{*{20}{c}} -3\\ -6 \end{array} \right] + \left[\begin{array}{*{20}{c}} 0\\ 6 \end{array} \right] + \left[\begin{array}{*{20}{c}} 4\\ -2 \end{array} \right] = \left[\begin{array}{*{20}{c}} 1\\ -2 \end{array} \right].$

### Example 2.

Given four vectors $$\mathbf{a}\left({1,2,-3}\right),$$ $$\mathbf{b}\left({1,-1,0}\right),$$ $$\mathbf{c}\left({-6, -4,2}\right),$$ $$\mathbf{d}\left({5, 2,-2}\right).$$ Find the coordinates of the vector $$2\mathbf{a} - \mathbf{b} - \mathbf{c} -2\mathbf{d}.$$

Solution.

Using the linear properties of the operations with vectors, we obtain

$2\mathbf{a} - \mathbf{b} - \mathbf{c} - 2\mathbf{d} = 2\left[\begin{array}{*{20}{c}} 1\\ 2\\ -3 \end{array} \right] - \left[\begin{array}{*{20}{c}} 1\\ -1\\ 0 \end{array} \right] - \left[\begin{array}{*{20}{c}} -6\\ -4\\ 2 \end{array} \right] - 2\left[\begin{array}{*{20}{c}} 5\\ 2\\ -2 \end{array} \right]= \left[\begin{array}{*{20}{c}} 2\\ 4\\ -6 \end{array} \right] - \left[\begin{array}{*{20}{c}} 1\\ -1\\ 0 \end{array} \right] - \left[\begin{array}{*{20}{c}} -6\\ -4\\ 2 \end{array} \right] - \left[\begin{array}{*{20}{c}} 10\\ 4\\ -4 \end{array} \right] = \left[\begin{array}{*{20}{c}} 2 - 1 + 6 - 10\\ 4 + 1 + 4 - 4\\ -6 - 0 - 2 + 4 \end{array} \right] = \left[\begin{array}{*{20}{c}} -2\\ 5\\ -4 \end{array} \right].$

### Example 3.

Given two coordinates of the vector: $$X = 12,$$ $$Y = -3.$$ Determine its third coordinate, provided that $$\Vert{\mathbf{a}}\Vert = 13.$$

Solution.

The length of the vector is determined by the formula

$\Vert{\mathbf{a}}\Vert = \sqrt{X^2 + Y^2 +Z^2}.$

From here we express the $$Z-$$coordinate:

$\Vert{\mathbf{a}}\Vert^2 = {X^2 + Y^2 +Z^2}, \Rightarrow Z^2 = \Vert{\mathbf{a}}\Vert^2 - X^2 - Y^2 = 13^2 - 12^2 - \left({-3}\right)^2 = 169 - 144 - 9 = 16.$

As you can see, the $$Z-$$coordinate can take two values: $$Z = \pm 4.$$

### Example 4.

Find the length of the vector $$\mathbf{a}\left({2,6,-3}\right)$$ and its direction cosines.

Solution.

The length of the vector is

$\Vert{\mathbf{a}}\Vert = \sqrt{X^2 + Y^2 + Z^2} = \sqrt{2^2 + 6^2 + \left({-3}\right)^2} = \sqrt{4 + 36 + 9} = \sqrt{49} = 7.$

Now we can calculate the direction cosines:

$\cos\alpha = \frac{X}{\Vert{\mathbf{a}}\Vert} = \frac{2}{7},\;\;\cos\beta = \frac{Y}{\Vert{\mathbf{a}}\Vert} = \frac{6}{7},\;\;\cos\gamma = \frac{Z}{\Vert{\mathbf{a}}\Vert} = -\frac{3}{7}.$

### Example 5.

Given $$\Vert{\mathbf{a}}\Vert = 4$$ and angles $$\alpha = 60^\circ,$$ $$\beta = 120^\circ,$$ $$\gamma = 45^\circ.$$ Calculate the vector projections on the coordinate axes.

Solution.

We use the formulas

$X = \Vert{\mathbf{d}}\Vert\cos\alpha,\;\;Y = \Vert{\mathbf{d}}\Vert\cos\beta,\;\;Z = \Vert{\mathbf{d}}\Vert\cos\gamma.$

Substituting the given values we get

$X = 4\cos60^\circ = 4\cdot\frac{1}{2} = 2,\;\;Y = 4\cos120^\circ = 4\cdot\left({-\frac{1}{2}}\right) = -2,\;\;Z = 4\cos45^\circ = 4\cdot\frac{\sqrt{2}}{2} = 2\sqrt{2}.$

Hence

$\mathbf{a} = \left({X, Y, Z}\right) = \left({2, -2, 2\sqrt{2}}\right).$

### Example 6.

The radius vector of a point M in space makes equal acute angles with all coordinates axes. Determine these angles.

Solution.

It is known that the sum of the squares of the direction cosines of any vector is equal $$1:$$

$\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1.$

Since $$\alpha = \beta = \gamma,$$ we get

$3\cos^2\alpha = 1, \Rightarrow \cos^2\alpha = \frac{1}{3}, \Rightarrow \cos\alpha = \pm\frac{1}{\sqrt{3}}.$

The cosine of an acute angle is positive. Therefore

$\alpha = \beta = \gamma = \arccos\frac{1}{\sqrt{3}} \approx 54.7^\circ.$