next up previous
Next: About this document ... Up: lab_template Previous: lab_template

Subsections


Vector Computations and Vector Functions

Purpose

The purpose of this lab is to use Maple to introduce you to a number of useful commands for working with vectors, including some applications. The commands come from the Maple linalg and CalcP7 packages which must be loaded before any of its commands can be used.

Getting Started

To assist you, there is a worksheet associated with this lab that you can copy into your home directory by going to your computer's start menu and choose run. In the run field type:

\\storage\academics\math\calclab

when you hit enter, you can then choose MA1023 and then choose the worksheet

Vector_start_B14.mw

Remember to immediately save it in your own home directory. Once you've copied and saved the worksheet, read through the background on the internet and the background of the worksheet before starting the exercises.

Background

The commands below are some of the most basic vector commands. Some examples using these commands can be found in the Getting Started Worksheet. More examples can be found in the Help screens for each command.

innerprod
Computes the dot product (also known as the inner product) of two vectors.
crossprod
Computes the cross product of two vectors.
evalm
Evaluates expressions involving vectors (and matrices).
norm
Computes the norm, or length, of a vector.

Angle between two vectors

If $\theta$ is the angle between the vectors ${\bf a}$ and ${\bf b}$, then ${\bf a} \cdot {\bf b}=\vert{\bf a}\vert\vert{\bf b}\vert \cos(\theta)$.

Vector Projection

The vector projection of ${\bf u}$ onto ${\bf v}$ or the component of ${\bf u}$ in the direction of ${\bf v}$ can be found using the following formula:

\begin{displaymath}pr_v{\bf u} = \frac{({\bf u} \cdot {\bf v}}{\vert{\bf v}\vert^2}){\bf v}\end{displaymath}

The scalar component of ${\bf u}$ in the direction of ${\bf v}$ can be found using the following formula:

\begin{displaymath}\frac{{\bf u} \cdot {\bf v}}{\vert{\bf v}\vert} \end{displaymath}

Area of a Triangle

The triangle created by connecting the terminal ends of the vectors ${\bf a}$ and ${\bf b}$ in standard form has area = $\frac{1}{2}\vert{\bf a} X {\bf b}\vert$.

A unit vector perpendicular to the plane containing points $P$, $Q$ and $R$ is given by $\displaystyle \frac{{\bf PQ}X{\bf PR}}{\vert{\bf PQ}X{\bf PR}\vert}$.

Exercises

  1. Given the vectors ${\bf a} = [2.14,6.02,-3.83]$ and ${\bf b} = [3.45,-5.28,-1.74]$, and ${\bf c} = [1.86,6.24,1.87]$, use Maple to compute the numeric value of the following expressions, if possible. For those that cannot be computed because they make no sense, please explain what is wrong.
    1. ${\bf a} + {\bf b}$
    2. $({\bf a}X{\bf b})\cdot({\bf a}+{\bf b})$
    3. $({\bf a} + {\bf b}) X {\bf c}$
    4. $({\bf a} + {\bf b})X({\bf c} \cdot ({\bf a}+{\bf b}))$

  2. Find the angle between each of the vectors above.

  3. Find a vector ${\bf v}$ perpendicular to ${\bf a}$ such that

    \begin{displaymath}{\bf b} = pr_a {\bf b} + {\bf v} \end{displaymath}

    where ${\bf a} = [4,-2 \pi]$ and ${\bf b} = [\alpha,\beta]$. Then show that ${\bf v}$ and ${\bf a}$ are perpendicular.

  4. Find the equation of the line through the point $(-6,1)$ and parallel to the vector ${\bf v}= -5 {\bf i} + 2 {\bf j}$. Plot the line and vector on the same graph.

  5. For the vectors ${\bf u = 5 {\bf i} - 3 {\bf j}}$ and ${\bf v = -\sqrt{2} {\bf i} + \sqrt{2} {\bf j}}$, find the vector projection of ${\bf u}$ onto ${\bf v}$ and the scalar component of ${\bf u}$ in the direction of ${\bf v}$.

  6. Find the area of the triangle with vertices $(-1,3,3)$, $(2,-4,1)$ and $(4,1,2)$. (Hint: Shift the triangle to the origin by representing two of the sides of the triangles with vectors in standard form.) Also, find a unit vector perpendicular to the plane containing these three points.

next up previous
Next: About this document ... Up: lab_template Previous: lab_template
Dina J. Solitro-Rassias
2014-12-10