*©Fernando Caracena 12 September 2012*

## Definition

A vector is a mathematical object that has both a magnitude and direction. Think of it as an arrow, not necessarily in our space, which has a length and points in a given direction.

Readings on dials and gages are real numbers, called scalars. Temperature is an example of a scalar quantity. Scalar arithmetic follows the rules for real numbers, which are both positive and negative.

Vectors have their own rules of addition, subtraction and multiplication, which are discussed below.

## Addition of Vectors

The graphical concept behind the addition of two vectors is simple. Plot the first vector as an arrow, and at the end of the arrow plot the second vector. Then connect the starting point of the first vector to the end point of the second vector, where the new arrow head resides. This idea is illustrated in Fig. 1, where **C** = **A** + **B**.

*©Fernando Caracena 12 September 2012*

## Definition

A vector is a mathematical object that has both a magnitude and direction. Think of it as an arrow, not necessarily in our space, which has a length and points in a given direction.

Readings on dials and gages are real numbers, called scalars. Temperature is an example of a scalar quantity. Scalar arithmetic follows the rules for real numbers, which are both positive and negative.

Vectors have their own rules of addition, subtraction and multiplication, which are discussed below.

## Addition of Vectors

The graphical concept behind the addition of two vectors is simple. Plot the first vector as an arrow, and at the end of the arrow plot the second vector. Then connect the starting point of the first vector to the end point of the second vector, where the new arrow head resides. This idea is illustrated in Fig. 1, where **C** = **A** + **B**.

The graphical way of adding vectors is great for visualization of the process, but it is not convenient for doing calculations. To form a more convenient notation, we define a set of unit vectors,** e**_{1}**, ****e**_{2}**, ****e**** _{3}**, which point along the x, y, and z axes, respectively. Using these unit vectors, which are perpendicular to each other in a Cartesian Coordinate System, we can write a vector in this space as a sum of three components

_{ }

** v **_{= }**e**** _{1 }**v

_{1}**+**

**e**

**v**

_{2}

_{2}**+**

**e**

**v**

_{2}**(1)**

_{2}### Scalar products of vectors

** A ****· ****B**** = |****A****| |****B****| ****cos****(****L**_{AtoB}**) (2)
**

**where L_{AtoB}** is the angle between the vectors

**A**and

**B**.

*The Scalar Product of Vectors*

- Scalar products of the unit vectors,
**e**_{1}**,****e**_{2}**,****e**._{3} - From the definition of a scalar product between two vectors (2), we can evaluate the scalar product between two of the unit vectors,

**e**_{1}**·****e**_{2 }**= |****e**_{1}**| |****e**_{2}**| cos****(90**°**)**

**e**** _{1}**·

**e**

_{2 }**= 1 * 1 *0**

**e**_{1}**· ****e**_{2 }**=** 0 . Repeating the above procedure for the following scalar product, we get a different result:

**e**_{1}**· ****e**_{1 }**= |****e**_{1}**| |****e**_{1}**| cos****(0**°**)**

**e**_{1}**· ****e**_{1 }**= **1** * **1** *** 1

or

**e**_{1}**· ****e**_{1 }**= **1.

The scalar products between the orthogonal set of unit vectors** e**_{1}**, ****e**_{2}**, ****e**** _{3}** can be summed up as follows:

**e**_{i}** · ****e**_{j }**= **1 if i equals j and 0 if i is not equal to j.

----------------------------------------------------------------------------------------------------------------

Example 1

Using the expansion (1) for vector **A** and Vector **B** find the scalar product between them.

ans.: First write out the vectors in terms of the unit vectors,

**A =** **e**** _{1 }**A

_{1}**+**

**e**

**A**

_{2}

_{2}**+**

**e**

**A**

_{2}

_{2}** B =** **e**** _{1 }**B

_{1}**+**

**e**

**B**

_{2}

_{2}**+**

**e**

**B**

_{2}

_{2 . }**Next, expand out the scalar products,**

** A**** .B** =

**e**

**·**

_{1}**e**

**A**

_{1 }**B**

_{1}**+**

_{1}**e**

**·**

_{1}**e**

**A**

_{2}**B**

_{1}

_{2}+ e**·**

_{1}**e**

_{3}A

**B**

_{1}

_{3}+**e**_{2}**·e**** _{1 }**A

**B**

_{2}**+**

_{1}**e**

_{2}

**·**e**A**

_{2}**B**

_{2}

_{2}+ e_{2}

**·****e**

_{3}

**A****B**

_{2}

_{3}+**e**_{3}**·e**** _{1 }**A

_{3}B

**+**

_{1}**e**

_{3}**·e**

**A**

_{2}_{3}B

_{2}+ e_{3}

**·****e**

_{3}A

_{3}B

**,**

_{3}and eliminate all the zeros and ones,

** A****·B** =A** _{1}**B

**+ A**

_{1}**B**

_{2}**+ A**

_{2}_{3}B

**.**

_{3}Example 2

Given the following two vectors find their (1) scalar product, (2) magnitudes, and angle between them:

**A** = 3 **e**** _{1}** + 4

**e**and

_{2}**B**= 3

**e**

**+ 4**

_{2}**e**

**.**

_{3}Although it is easy to do most of this problem by inspection, and look up the angle for the cosine obtained from the scalar product, I have included a bit of python code that solves the problem in listing 1 (below).

Note, that by inspection we get the results,

|**A**|=5, |**B**|=5 and **A****·****B**=12,

so that cos(L_AB)=12.0/(5.*5.)=0.48.

________________________________________________________

ipython --pylab

import math

A1=3

A2=4

A3=0

B1=0

B2=3

B3=4

A=array([A1,A2, A3])

B=array([B1,B2,B3])

A_dot_B=sum(A*B)

Abs_A=sqrt(sum(A*A))

Abs_B=sqrt(sum(B*B))

L_AB=(180./math.pi)*math.acos(A_dot_B/Abs_A/Abs_B)

print A_dot_B,', ', Abs_A,', ', Abs_B,', ', L_AB,'degrees'

# ans.: 61.3145979859 degrees.

#____________________END_____________________________