66.16: Vector Arithmetic
( \newcommand{\kernel}{\mathrm{null}\,}\)
A vector A may be written in cartesian (rectangular) form as
A=Axi+Ayj+Azk
where i is a unit vector (a vector of magnitude 1) in the x direction, j is a unit vector in the y direction, and k is a unit vector in the z direction. Ax,Ay, and Az are called the x,y, and z components (respectively) of vector A, and are the projections of the vector onto those axes.
The magnitude ("length") of vector A is
mathbfA|=A=√A2x+A2y+A2z
For example, if A=3i+5j+2k, then |A|=A=√32+52+22=√38.
In two dimensions, a vector has no k component: A=Axi+Ayj.
Addition and Subtraction
To add two vectors, you add their components. Writing a second vector as B=Bxi+Byj+Bzk, we have
A+B=(Ax+Bx)i+(Ay+By)j+(Az+Bz)k.
For example, if A=3i+5j+2k and B=2i−j+4k, then A+B=5i+4j+6k.
Subtraction of vectors is defined similarly:
A−B=(Ax−Bx)i+(Ay−By)j+(Az−Bz)k.
For example, if A=3i+5j+2k and B=2i−j+4k, then A−B=i+6j−2k.
Scalar Multiplication
To multiply a vector by a scalar, just multiply each component by the scalar. Thus if c is a scalar, then
cA=cAxi+cAyj+cAzk.
For example, if A=3i+5j+2k, then 7A=21i+35j+14k.
Dot Product
It is possible to multiply a vector by another vector, but there is more than one kind of multiplication between vectors. One type of vector multiplication is called the dot product, in which a vector is multiplied by another vector to give a scalar result. The dot product (written with a dot operator, as in A⋅B ) is
A⋅B=ABcosθ=AxBx+AyBy+AzBz,
where θ is the angle between vectors A and B. For example, if A=3i+5j+2k and B=2i−j+4k, then A⋅B=6−5+8=9.
The dot product can be used to find the angle between two vectors. To do this, we solve Eq. (P.6) for θ and find cosθ=A⋅B/(AB). Applying this to the previous example, we get A=√38 and B=√21, so cosθ=9/(√38√21), and thus θ=71.4∘.
An immediate consequence of Eq. (P.6) is that two vectors are perpendicular if and only if their dot product is zero.
Cross Product

Another kind of multiplication between vectors, called the cross product, involves multiplying one vector by another and giving another vector as a result. The cross product is written with a cross operator, as in A×B. It is defined by
A×B=(ABsinθ)u=|ijkAxAyAzBxByBz|=(AyBz−AzBy)i−(AxBz−AzBx)j+(AxBy−AyBx)k,
where again θ is the angle between the vectors, and u is a unit vector pointing in a direction perpendicular to the plane containing A and B, in a right-hand sense: if you curl the fingers of your right hand from A into B, then the thumb of your right hand points in the direction of A×B (Fig. P.1). As an example, if A=3i+5j+2k and B=2i−j+4k, then A×B=(20−(−2))i−(12−4)j+(−3−10)k=22i−8j−13k.
Rectangular and Polar Forms
A two-dimensional vector may be written in either rectangular form A=Axi+Ayj described earlier, or in polar form A=A∠θ, where A is the vector magnitude, and θ is the direction measured counterclockwise from the +x axis. To convert from polar form to rectangular form, one finds
Ax=AcosθAy=Asinθ
Inverting these equations gives the expressions for converting from rectangular form to polar form:
A=√A2x+A2ytanθ=AyAx