# Vectors

We manipulate scalar information all the time using plus, minus, multiply and divide operators. The scalar quantities are not always of the same type. We can add a count of pears to a count of apples and give the answer as pieces of fruit. It would make little sense to multiply a quantity of apples by a quantity of pears but their are many unlike quantities we multiply together to get a result. For example we continuously sum the product of voltage by current taken from the mains by time to get the energy we use in our homes.

Vectors are scalars with a direction that matters. One way of showing both size and directions is to draw vectors on graph paper using a coordinate system. The length of an arrow represents the size or scalar part of the vector. The alignment of the arrow and its head represents the direction of the vector.

If you and I push an object in the same direction the scalars of our pushes add. If we push in opposite directions they subtract. If I am pushing an object northward and you are pushing on the same object with an identical force but toward the south west we can guess that the pushed object will move, if it can do so, both to the north and west. More accurately by combining vectors geometrically as shown in the diagram we can get a combined force with both size and direction. Of course we must draw the vector lengths to some scale and with the right relative directions.

It may be more convenient and more accurate to work out the result algebraically. The top triangle from the above is illustrated here and we can use the equality of the cosine rule (see my blog on trigonometry) to determine the size of the result.

Once we have R we can determine the part of it that acts to move the object west and the part that acts to move the object north. These are as shown in green. Like the M and Y forces that actually delivered R these two component vector forces would deliver the same R force result. We have if you like replaced the M and Y forces with an east/west component and a north/south one that would deliver the same result. We call this process resolving. In this case we have resolved the M and Y forces into the convenient north/south and east/west directions but resolving can take place in any direction.

We can look at these resolved component vectors shown green in another way and consider them as scalar multiples of unit vectors. One is a scalar multiple of the unit west vector shown in red and the other a scalar multiple of the unit north vector in blue.

We can clearly add and subtract vectors but can we and what does it mean to multiply two vectors ?

Let us consider a practical example. The diagram shows the basic operation of an electrical motor. View the currents as going away from you under the North magnetic pole (into the screen) and coming toward you (out of the screen) under the South magnetic pole. The role of a commutator is to deliver current flow directions under each magnetic pole such that the interactions between current and magnetic field output forces that support one another and produce rotary motion. The forces, current flows and magnetic field strength are all vectors.

The force vectors are due to the interactions of the current vectors with the magnetic field vector. Their values are related to the product of current and field values and at a maximum when current and field directions are at right angles, as in the diagram. Force direction is perpendicular to the plane of the field and current vectors.

The force vectors, shown in green, are most effective in delivering the rotary torque. But there are are many other less effective force vectors, as in yellow; less effective because the strength of the magnetic field acting on current conductors not under the poles is diminished and because only a component of their output forces is effective in delivering the rotary motion. We say the force vector is the cross product of the field and current vectors.

The vector dot product

If in a 3d coordinate system we have a vector A with component lengths x1  yz1   and a vector B with component lengths x2  y2  z2   then if a vector C = vector A – vector B it will have component lengths of x1 –x2   y1 –y2  and z1 –z2.

If A and B are perpendicular to one another then Pythagoras tells us that the length of C squared ||C||2 equals ||A||2 +  ||B||2 . It means (x1 –x2)+ (y1 –y2)+ (z1 –z2) must equal (x12 +y12 + z12 ) + (x22 +y22 + z22 ).
Simplified this means x1x2 + y1y2 + z1z2 = 0 when two vectors are perpendicular to one another. We call the term x1x2 + y1y2 + z1z2 the dot product of the two vectors and show it as A ⋅ B

Where two vectors A and B have an angle Θ between them the Cosine rule tells us that ||C||2  = ||A||2  +  ||B||– 2||A|| ||B||cosθ. Substituting all of the above paragraph x, y and z values for ||C||2, ||A||2  and  ||B||2 into this formula we discover the more general formula in which the dot product A ⋅ B = x1x2  + y1y+ z1z2 = ||A|| ||B||cosθ . So the dot, sometimes called scalar product, is the product of one vector length multiplied by the other vector length projected onto it.

The vectors cross product

Consider two vectors A and B, shown in red and yellow. Each has components along the x, y and z axes shown as Ax Ay Az and Bx By Bz. Those vector components can be regarded as scalars with their directions determined by unit vectors i , j or k. So for example Ax i describes vector A’s component along the x axis, Ax being its size and i setting its vector direction.

We saw above how a motor force only arose when there were components of magnetic field and current acting across one another. No force arose when the magnetic field and current aligned. So to get a resultant cross product vector C = A x B we must multiply each component of vector A by each component of vector B but ignore the products of aligned components (i.e we ignore any multiplications involving components with like i, j or k directions as they contribute nothing to the cross product vector. It is also worth noting that as our cross product vector C will be perpendicular to the plane of A and B that both C ⋅ A and C ⋅ B will be zero.

The very nature of a cross product is such that an i direction component multiplied by a j direction component will give us a k direction component. In fact i j = k, jk = i, ki = j, ji = -k, ik = -j and kj = -i as per the cyclic diagram shown. Now, knowing the above we do the cross product.

A x B = (Ax i + Ay j + Az k) x (Bx i + By j + Bz k)
= Ax By ij + Ax Bz ik + Ay Bx ji + Ay Bz jk + Az Bx ki + Az By k j
= Ax By k – Ax Bz j – Ay Bx k + Ay Bzi + Az Bx j – Az By i

Simplifying the above A x B= i ( Ay Bz – Az By ) – j( Ax Bz – Az Bx) + k( Ax By – Ay Bx )

The above cross product can be written in the simpler matrix form left. Follow the above terms in the matrix. We write the j term in the above cross product as a negative because the seen matrix gives us Ax Bz – Az Bx but we could have written it as a a positive and multiplied the terms in cyclic fashion regarding i as after k. and thereby getting Az Bx – Ax Bz.

On the right, we show a cross product vector geometrically. It is at right angles to the plane containing the multiplied vectors and its magnitude is that of the yellow area AB sinθ.

In our motor example the angle between current (say A) and field (B) is a right angle and the yellow shape would be a rectangle. The force( A x B) is at right angles to the plane of current and field and its size is related to the yellow area. Such a force will clearly reduce in value as the angle between current and field gets smaller becoming nothing when current and field have like direction.