1 Vector basics
Contents
1 Vector basics#
Introduction#
Although vectors, such as force or velocity, have two ‘dimensions’ - magnitude and direction - mathematically, they can have any number of dimensions. A vector’s components need not be objects in any physical space; this is not as bizarre as it sounds, for example, your car can be described by its make, colour, manufacture date, engine-capacity, and model. These values can form a vector such as (Ford, yellow, 2005, 1900 cc, estate). However, a vector is more than just a list; it is constructed from a basis set. The basis set contains the primitive components and the vector is constructed as a linear combination of these elements; more of this later. The basis set is not always apparent, for example, when drawing arrows on a graph, but in all cases, including topics as diverse as quantum mechanics and geometry, the basis set must be explicitly defined before a calculation is started. However, in apparent contradiction to this, many vector properties and formulae can be obtained by symbolically, which means algebraically,
1.1 Notation#
It is important to distinguish vectors from scalars. Scalars are printed in normal typeface, 1, 2, 3, etc. Symbols with an arrow
1.2 Basis sets#
In describing many phenomena, such as the static magnetic field in an NMR machine, right-angled (rectilinear) or Cartesian axes are used. A vector can be represented in this space as a linear combination or multiples of three vectors of unit length each one pointing from the origin along each of the x-, y-, or z-axes. These three unit vectors form the basis set, and in three dimensions are normally labelled
Before basis sets are considered, some general vector properties are defined, which still apply whether we specifically use them in the form of the components of a basis set or not.
1.3 Position vectors#
Conventionally, positional vectors are drawn as arrows to indicate which way they point, and a set of axes is not usually shown. Some of the infinite number that could be drawn is shown in Fig. 6.1. Notice that in the top left of the figure, vectors
In Fig. 6.1 (iii), the vectors
where
It is easy to get muddled with vector directions and the simplest thing is to make
To subtract the two vectors shown in (iii), to obtain
Figure 1 Diagram showing some examples of adding and subtracting vectors.
In Fig. 2, OA and OB are vectors and because both start at the origin, they are called position vectors . The basis set for OA and OB are unit vectors along the
The length of a position vector is, by Pythagoras’ theorem,
where
The length or projection of
The vector
Figure 2. Two- and three-dimensional Cartesian coordinates. Right: A vector
1.4 Surface Tension#
The surface tension of a liquid is a property of the intermolecular forces that exist in a liquid. Mainly these forces are directed into the liquid at the surface with air (or with the liquid’s vapour) and not out of the surface. The energy of molecules at the surface is greater than that of the bulk and consequently it takes energy to increase the surface area. In thermodynamic terms the surface tension
Figure 2a. Left: The interface of a liquid, air and a solid surface showing the force vectors. Right: Examples of ‘whetting’ top, forming a monolayer, and non-whetting lower. The vectors shown as surface tensions
A drop of liquid water will form on a hydrophobic surface, such as polythene or a fatty acid surface and spread on one that is not such as clean glass. The diagram 2a shows this effect. If the liquid on the solid surface in not to spread then the forces must balance. The vertical components are in equilibrium because the surface is solid, the horizontal ones are shown in fig 2a and are
where the cosine gives the projection of the force onto the horizontal plane. If
If one liquid is added to another and they are immiscible, such as a drop of n-decane added to water, then a lens may form on the surface, see figure 2a1. The shape and position of the lens will depend on the three densities and inter-facial tensions. The surface tension of n-decane is 23.9 mN/m and that between it and water is 52 mN/m which is not a huge amount less than that of water’s surface tension because here also hydrogen bonds have to be broken to accommodate the hydrophobic liquid.
Figure 2a1. A lens forming on a surface between two immiscible liquids. ‘a, O, w’ refer to air, organic liquid and water respectively. The angles are measured relative to a horizontal axis as shown. The vectors
The condition for equilibrium is that between the vertical components and horizontal components, the horizontal ones are,
and vertical (ignoring gravity),
If the surface tension
1.5 Newton Diagrams, molecular beams and reactive scattering#
An important example of vector addition is found in Newton Diagrams which are used to describe the kinematics of crossed molecular beams. In these experiments two gaseous species are cooled by expansion into a vacuum chamber and the atoms and molecules are made to collide into one another and the direction and energy of the scattered species is measured. Although the atoms or molecules are cooled they still have considerable velocity, a few hundred metres per second is not uncommon. If no reaction takes place the collision is called elastic (Ar + Ne and Kr +HCl for example) and inelastic if there is a chemical reaction such as
A rough sketch of the experimental set up is shown in figure 2b. Inside the evacuated chamber, parts of which may be cooled with liquid nitrogen, the gas pressure is so low that there are no collisions between residual gas molecules and the molecular beams, and these only interact where they cross. After collision the species recoil in a manner determined by the potential energy between them, see Chapter 11.3.8 (Numerical Methods). By examining the number of particles detected vs. the measuring angle the shape of the potential energy between the interacting species can be elucidated. In some cases the recoiling species can be observed to be in the backwards direction, which means being scattered towards the source with an angle
Figure 2b. Sketch of a crossed molecular beam experiment. The oven heats the gas or if a metal is used to form its vapour. The difference in temperature is used to determine the collision energy. Most of the gas/vapour is pumped away here but the centre part of the gas jet is passed into the reaction chamber via the skimmer. This is cone shaped with a very small hole in the apex. The main vacuum chamber is kept under ultra low vacuum. The detector can be moved in an arc to collect scattered species.
The two beams are represented by vectors of length equal to their velocity. Often the beams approach one another at right angles as in figure 2b because this is simplest experimentally. The centre of mass is a constant of the motion and its vector is shown in the figure also. After collision, the centre of mass still moves along the same direction as before collision, but now the species move with different velocities i.e. different speeds and directions, see figure 2d. In a Newton Diagram is conventional to show the reactant beams and scattered product beams on the same diagram but with the reactant vectors starting at zero together with the products. As there is spherical symmetry along the direction of each beam these angles are equivalent and so vectors can be drawn in a plane and for the purposes of illustration it is assumed scattering is in this plane also. The molecular beams will also have an energy and hence velocity spread, but, for simplicity we assume that this can be ignored.
Figure 2c. Two molecular beams represented by vectors pre - collision. The centre of mass vector
Figure 2d. Newton Diagram for elastic scattering of species 1 and 2. In this figure the collision occurs at the origin of vectors
In elastic scattering there is no chemical reaction and species 1 is scattered from
According to classical mechanics for any impact parameter
Figure 2e. Sketch showing one particle (atom/molecule) approaching the other with an attractive potential at long range and a repulsive one at short range, such as a Lennard-Jones potential. The scattering angle is
The total kinetic energy and total momentum remain fixed throughout the whole process and so conservation of momentum produces
where
The momentum can also be written as
Conservation of kinetic energy,
where
The initial relative velocity of the two species is ,
(see fig 2c) and after collision,
where
Construction from the vector diagram gives
which means that the velocity of a species is the velocity of the centre of mass plus the velocity relative to that.
The relative velocity’s components
and similarly for the other vectors,
from which it can be seen that for elastic scattering
The direction of the scattering, forwards or backwards can be appreciated with figure 2d and fig 11.5, 11.6 and 11.10 (Chapter 11). If the impact parameter is large the approaching atom skims past the other and its trajectory is only slightly changed and scattering is in the forwards direction. If, on the other hand
If a chemical reaction can occur the process is called reactive or inelastic scattering and then the mass of the scattered species has changed
If the impact parameter is large, at grazing incidence where their separation is a little larger than the sum of their radii, then a ‘spectator stripping’ reaction may occur. An example of this is
A third possibility exists which is that the species form a complex instead of immediately scattering. If this complex is long-lived compared to the time it takes to reach the detector, a few milliseconds, then the only product to be observed will be in the direction determined by the centre of mass vector. If the complex is short lived, say a few rotational periods then the products will be sprayed out in all directions as it rotates making analysis very hard. See Bernstein (1982) and Steinfeld (1999) for a full explanation of reaction dynamics.
2 Vector multiplication: dot, cross, and triple products#
Multiplying two vectors together can be done in two ways; the result is either a scalar (number), or a vector.
Triple products, as you would imagine, are more complicated, and can form a vector
2.1 Dot product#
The dot product of two vectors
where
We can find the angle between any two vectors by rearranging equation 1;
Before this equation can be evaluated, the vectors
In figure 2c above the centre of mass scattering angle
and the vectors are defined above giving
because the scattering is elastic
2.2 Cross product#
The dot product is not the only way we can multiply two vectors, this can be done so that a vector rather than the scalar is produced. The cross product is
where
2.3 Perpendicular vectors#
If the angle
Because the two vectors are at right angles to one another, the projection of vector
The cross product of two perpendicular, three-dimensional vectors is not zero, but
2.4 Parallel vectors#
If two vectors are parallel,
Figure 3. Left: Vector
2.5 Basis sets#
Once we define a basis set then specific, rather than general calculation can be performed. For example, if vectors
(a) Every vector is always made from a linear combination of the components of its basis set.
(b) Because a basis set is the minimal possible set, it cannot be decomposed any further or made any simpler.
(c) Any vector is unchanged by changing its basis set and therefore its coefficients must change between bases.
For example, the vector
Any vector can always be represented in several different but equivalent ways depending on which is easiest. We can choose to manipulate a three-dimensional vector in multiples of unit basis vectors
where the individual vectors are
or more commonly as
If the basis set is chosen as row matrices then
The matrix formulation of vectors is very adaptable and not restricted to three dimensions; in fact, any number of dimensions can be used. However, the
The elements of basis set can be numbers, or they could be a vector, a matrix, or a function or a set of functions. Some examples are considered more fully after some basic properties have been described. Using functions as a basis set is described in Chapter 9. For the present, we shall assume that a suitable basis set always exists and perform some calculations.
2.6 Vector origin#
If it is not otherwise specified, it is assumed that the origin of a vector is at the centre of the coordinates, i.e. at
2.7 Vector magnitude#
The magnitude of a vector
but we can equivalently calculate
because any vector is parallel to itself and therefore
Figure 4. The orthogonal and normalized base vectors
2.8 Vector addition and subtraction#
Addition follows the familiar rules, except that each element in the vector adds separately; for example, the three-dimensional vectors represented by the two sets of coordinates is
and subtracting similarly
which, in effect, is what is done when drawing out a vector triangle. The same rule applies when adding matrices. In row and column matrix-vector notation, the same vector addition is written in matrix form as
Addition is commutative
and associative
which means that vectors can be added or subtracted in any order.
2.9 Dot Products or Inner Products in matrix-vector form#
The dot product using vectors in a three-dimensional basis set is calculated by defining the vectors as one-dimensional matrices, multiplying element by element and summing the result. See chapter 7 for matrix multiplication. The result is
In a dot product, the left-hand of the two vectors is always written as a row and the right always a column. The vector dot product is also called the vector inner product .
Changing a row into a column vector is called transposing , and this operation is indicated by a superscript
The angle between two vectors is
The normalization terms on the bottom of this equation are just the length of each vector as calculated by Pythagoras’ theorem. The angle between two vectors
2.10 Colliding molecules#
Newton diagrams describing elastic scattering are given above. The angles and vectors are shown in figure 2c. Suppose the initial speeds in an experiment colliding
The initial vectors are
thus
with magnitude
The dot product connecting the
where
The centre of mass vector is
which using the values given is
and so
which are the coordinates at the end of
Now that we have both
and the calculation is simple!
and
making
The calculation starting with
2.11 ISBN number#
An unexpected application of the dot product of a large vector is that used to check the ISBN number of a book. This code is unique to a book and also to each edition. A typical code is
The calculation to produce the check digit (
import numpy as np # used to get dot product, % is modulus
n = [1 if i % 2 == 0 else 3 for i in range(12)] # make list 131313...
isbn= [9, 7, 8, 0, 1, 9, 9, 2, 3, 0, 9, 1]
print('check digit =', 10 - np.dot(n,isbn)%10 )
check digit = 4
3 Unit vectors and normalizing vectors#
Unit vectors, as their name suggests, have a length of
where
A second method is to use the dot product formula on the same vector,
where
The angle
4 The orthonormal base vectors#
A general method for describing a three-vector is to express it in terms of vectors along a set of axes. If the mutually perpendicular set of
where just for this special basis set the vectors
To be clear: any vector such as
If two vectors are
their dot product is
At first sight, this seems a very complicated way of finding the dot product. However, the full multiplication is not necessary for two reasons; first, because
because any vector is clearly parallel to itself and
Stated in words:
Calculate the dot product by multiplying both of the
Therefore, for our example
This is an important point as it means we have two ways of calculating vectors. When vectors have more than three dimensions, the matrix methods become far simpler, particularly when using the computer to do calculations.
Figure 5. Unit vectors
The dot product of the vectors
and in the matrix/vector basis where we multiply elements in the same position and add, i.e. (0,0)+(1,1) etc
If we wish to find the angle between the vectors then eqn. 2 has to be used. The length of a vector is the sqyure root of its dot product with itself so for vector
so
5 Summary#
(i) Dot Product#
The magnitude of
A vector defined as
and has dot product
In three dimensions only, in addition to the matrix method, orthonormal base vectors
(ii) The Cross Product exists only in three dimensions#
where