Chp2 Linalg
Chp2 Linalg
Chp2 Linalg
Linear algebra
The second chapter of this book is concerned with vectors, matrices and linear transformations. Determinants are
introduced, together with ways in which to calculate them. These concepts are particularly relevant in analytic
geometry, where we use them to describe projective transformations.
Linear transformations
Linear transformations are transformations of n-dimensional Euclidean space 5n expressible as x M x, where
x x1 , x2 , …, xn is the position vector of a point X . M is known as the transformation matrix. For example, the
1 1
linear transformation with matrix is shown below.
0 1
The position of the origin, O, is left unchanged by a linear transformation. Degree-d algebraic curves remain as
degree-d algebraic curves; in particular, lines map to lines and conics map to conics. In the shear shown above, a
circle is transformed into an ellipse. Parallel lines remain parallel when linear transformations are applied.
Finally, the (signed) area of any shape is multiplied by detM when the transformation is applied, where detM
is the determinant of the transformation matrix. Hence, ratios of areas remain unchanged.
Common linear transformations include rotations (about the origin), reflections (in lines through the origin),
dilations (where the origin is the centre of homothety) and stretches (again, preserving the origin). One can
combine transformations by multiplying their matrices.
1. Let A 1, 0, 0, B 0, 1, 0 and C 0, 0, 1 be three points in 53 . After applying the transformation with
a b c
matrix M d e f , find the new locations of A, B and C.
g h i
Consider the unit cube 0, 1 0, 10, 1, where denotes Cartesian product. It is transformed into a paral-
lelepiped with volume V detM .
In the diagram above, the blue cube is transformed into the red parallelepiped. The origin (the common vertex of
the cube and parallelepiped) remains fixed.
_0DWKHPDWLFDO2O\PSLDG'DUN$UWV
Determinants
The determinant of a square matrix M is a positive real number detM associated with that matrix. It behaves
like the norm of a complex number, in that it is multiplicative.
 For two square matrices A and B of equal dimension, detA B detA detB. [Multiplicativity of determinants]
If a matrix A has an inverse matrix A1 such that A A1 A1 A I, then detA detA1 detI 1. Hence, it is
clear that a matrix with a determinant of zero has no inverse. Indeed, the converse is also true: all square matrices
with non-zero determinants possess unique well-defined inverses. If a matrix is one-dimensional, then its
determinant is equal to its only element. Otherwise, we compute it recursively.
a1,1 a1,2 a1,n
a2,1 a2,2 a2,n
Mf
an,1 an,2 an,n
Consider the matrix above. We compute the determinant using the following process:
É For some 1 i n, consider the element ai,1 in the first column of M .
É The n 1-dimensional matrix Mi is obtained by removing everything in the same row or column as ai,1 .
É Compute the value Si ai,1 detMi .
É Then, we have detM S1 S2 S3 S4 … 1n1 Sn .
This recursion results in the determinant equating to a sum of n terms, each of which is a product of n elements
of M . After expanding this somewhat complicated recursive definition, we reach a more elegant formulation.
 detM 1P a1,1 a2,2 … an,n , where the sum is taken over all permutations of 1, 2, 3, …, n. We
sym
define P to be even if is an even permutation, and odd otherwise. [Leibniz formula for determinants]
x y z
2. Express det z x y as a polynomial in x, y, z.
y z x
You may have noticed that for 3 3 determinants, the even permutations correspond to the three NW-SE
‘diagonals’ and the odd permutations correspond to the three NE-SW ‘diagonals’. The diagonals are considered to
wrap around the edges of the matrix as though it were a cylinder. This trick is known as the Rule of Sarrus.
a b c a b c
d e f d e f
g h i g h i
a e i b f g c d h a f h b d i c e g
Leibniz’s formula requires nn elementary operations, so is rather time-consuming for large matrices, taking
exponential time. Instead, it helps to simplify the calculation by performing operations on the matrix.
0DWKHPDWLFDO2O\PSLDG'DUN$UWV_
 Applying elementary operations to the rows or columns of M cause its determinant to behave in a predictable manner:
Multiplying any row or column of M by x causes the determinant of M to be multiplied by x;
Adding (or subtracting) any multiple of one row to another row does not affect the determinant of M ;
Swapping any two rows causes detM to be multiplied by 1;
The transpose of M has the same determinant as M .
1 1 1
3. Factorise det x y z into four linear factors.
x3 y3 z 3
Interpolating curves
The determinant of a matrix is zero if and only if one row can be expressed as a linear combination of the others.
This is known as linear dependence. This enables one to create a curve of some type (e.g. a polynomial, circle or
conic) interpolating between various points. For example, if we have a sequence of n points xi , yi , then the
following curve is a degree-n 1 polynomial passing through all n points.
1 y x x2 x3 xn1
1 y1 x1 x1 2 x1 3 x1 n1
 The curve det 0 passes through all points xi , yi . [Lagrange interpolating
1 yn xn xn 2 xn 3 xn n1
polynomial]
This is obvious, as the determinant equals zero if two rows are identical. It is also a degree-n 1 polynomial, as
we can use the recursive determinant formula to express it as A1 A2 y A3 x A4 x2 A5 x3 … An1 xn1
and rearrange it. If A2 0 then this method will fail, but that only occurs if two points have the same abscissa.
Using this idea, we can create a unique conic passing through any 5 points in general position, a cubic passing
through 9 points et cetera. If the points are not in general position, then seemingly paradoxical things can occur.
This forms the basis of the powerful Cayley-Bacharach theorem explored in the projective geometry chapter. The
general equation of a conic is A B x C y D x2 E y2 F x y 0, so we can determine the equation of the
conic passing through five given points.
1 x y x2 y2 xy
1 x1 y1 x1 2 y1 2 x1 y1
1 x2 y2 x2 2 y2 2 x2 y2
 The conic 0 passes through all points xi , yi . [Interpolating conic]
1 x3 y3 x3 2 y3 2 x3 y3
1 x4 y4 x4 2 y4 2 x4 y4
1 x5 y5 x5 2 y5 2 x5 y5
4. Find the equation of the circle passing through the non-collinear points x1 , y1 , x2 , y2 and x3 , y3 .
[Circumcircle equation]
The determinant formula is not constrained to Cartesian coordinates; it can be used to find interpolating curves in
any coordinate system, such as projective homogeneous coordinates, areal coordinates, complex numbers and
even polar coordinates. As we cover the other coordinate systems in greater depth later in the book, it is worth
messing around with polar coordinates here.
_0DWKHPDWLFDO2O\PSLDG'DUN$UWV
P
r
O
 The point with polar coordinates P r, in the Euclidean plane is defined such that O P has length r and makes an
angle of with the positive x-axis. In Cartesian coordinates, P r cos , r sin . [Definition of polar coordinates]
Although the value of r is uniquely defined, is not; adding or subtracting multiples of 2 will describe the same
point. This is a consequence of the periodicity of the elementary trigonometric functions.
5. Let Q r1 , 1 be a point on the polar plane. Show that the equation of the circle with centre Q and radius
a is given by r2 r1 2 2 r r1 cos 1 a2 . [Polar equation of a circle]
6. Hence show that a circle has general equation A r2 B r cos C r sin D 0. [General polar equation
of a circle]
It now becomes more obvious why this should work: the general equation for a circle in Cartesian coordinates is
Ax2 y2 B x C y D 0, and we have x2 y2 r2 , x r cos and y r sin .
7. Find the equation, in polar coordinates, of the circle passing through the non-collinear points r1 , 1 ,
r2, 2 and r3 , 3 . [Circumcircle equation for polar coordinates]
If three of the points are collinear, the term in r2 vanishes and we are left with the equation of a line.
A curve which is particularly amenable to expressing in polar coordinates is the Archimedean spiral. If the spiral
h
is centred on the origin, then it has polar equation r 2
. h is the separation between successive turns of
the spiral, and is the angle at which is emerges from the origin.
0DWKHPDWLFDO2O\PSLDG'DUN$UWV_
8. Find the equation for an Archimedean spiral of centre O passing through r1 , 1 and r2 , 2 .
[Interpolating spiral]
Adding multiples of 2 to either of the angles can alter the number of turns on the spiral and its direction. There
is not a unique interpolating spiral with centre O passing through two given points; there are countably infinitely
many.
Geometric transformations
So far, we have considered linear transformations. If we compose an arbitrary linear transformation with an
arbitrary translation, then we obtain an affine transformation. Affine transformations have all the geometric
properties of linear transformations, but do not necessarily preserve the origin. They are a special case of projec-
tive transformations, which are covered in a later chapter.
Projective
Affine Möbius
Linear Similarities
Congruences Homotheties
Translations
Affine transformations are projective transformations which preserve the line at infinity. Linear transformations
also preserve the origin, whereas similarities preserve (or reverse) the circular points at infinity (thus mapping
circles to circles). Congruences are similarities with a determinant of 1, whereas homotheties are similarities
which preserve the direction of all lines (thus all points on the line at infinity). Translations (and reflections in a
point) lie in the intersection of congruences and homotheties.
Do not worry if these terms are unfamiliar to you; they are explained properly in later chapters.
Scalar product
a1 b1 c1
Let a a2 , b b2 and c c2 be three vectors in 53 .
a3 b3 c3
_0DWKHPDWLFDO2O\PSLDG'DUN$UWV
 The dot product (or inner product, or scalar product) a b a1 b1 a2 b2 a3 b3 a b cos , where is the
angle between the vectors a and b. [Definition of dot product]
The dot product generalises to vectors in 5n . This allows us to interchange between trigonometric, geometric and
algebraic inequalities.
We can generalise the idea of a vector to a more abstract object, and thus extend the Cauchy-Schwarz inequality
even further. See Introduction to Inequalities (Bradley) for an example of this.
Another application of the dot product in inequalities is a proof of the rearrangement inequality. That states that
if we have two non-negative sequences of equal length and multiply corresponding terms, the product is greatest
when the sequences are sorted in the same order.
Proof:
We can prove this by considering the vectors a and b in the space 5n . Observe that all n vectors in b (the set
of vectors obtained by permuting the elements of b) are of equal length, so lie on a sphere with centre 0. The dot
n
product ai bi of the vectors a and b is greatest when the angle between them is smallest, which occurs when
i1
a and b are closest (as all vectors in b are of equal length). So, this has been converted into the equivalent
problem of proving that b is the closest vector to a in b . We consider the Voronoi diagram of 5n , which is
simply a division of space depending on which b is closest.
The diagrams above illustrate the cases when n 2 or n 3. The Voronoi diagram is created by the set of planes
of the form xi x j , which each partition space into the regions xi x j and xi x j . This means that the regions of
the Voronoi diagram are determined by the ordering of the elements; in the case where n 3, we have six tetrahe-
dral regions, namely x1 x2 x3 and the five other permutations. As the elements of a and b are ordered in the
same way, they must inhabit the same region. Hence, b is the closest vector in b to a, and we are finished.
0DWKHPDWLFDO2O\PSLDG'DUN$UWV_
a 2 b 3 a3 b2 i a1 b 1
 The cross product (or vector product, or exterior product) a b a3 b1 a1 b3 det j a2 b2 , where i, j, k are
a 1 b 2 a2 b1 k a3 b 3
1 0 0
the unit vectors 0 , 1 and 0 , respectively. [Definition of cross product]
0 0 1
a 1 b1 c 1
 a b c a b c det a2 b2 c2 . [Scalar triple product]
a 3 b3 c 3
Sir William Rowan Hamilton once had an epiphany whilst crossing a bridge, and carved the formula
2 Þ2 k 2 Þ k 1 into one of the stones. This defines an extension to the complex numbers, which has four
orthogonal units (1, , Þ, k) as opposed to two. A Hamiltonian quaternion is a number of the form
x
w x y Þ z k, where w, x, y, z 5. Using a slight abuse of notation, this can be written as w y . A scalar
z
added to a vector?! We can multiply two quaternions p a b and q c d together to give the quaternion
p q a c b d a d c b b d. Multiplication of quaternions is associative and distributive, but not
commutative; p q ! q p in general. This is inherited from the non-commutativity of the cross product.
Solutions
a b c
1. Using matrix multiplication, we get A d , B e and C f .
g h i
x y z
2. det z x y x3 y3 z3 3 x y z, as the NW-SE diagonals are x3 , y3 , z3 and the NE-SW diagonals are
y z x
each x y z.
1 0 0
3. We deduct the first column from the other two, obtaining det x y x z x . Applying the recursion
x3 y3 x3 z 3 x3
yx zx
formula reduces this to det 3 . We then divide the first column by y x and multiply the
y x3 z 3 x3
1 zx
entire determinant by y x, obtaining y x det 2 . Applying a similar factorisation
y x x y z x3
2 3
1 1
to the second column results in y x z x det 2 . Leibniz’s formula can now
x y x y x z2 x z
2 2
1 x y x2 y2
1 x 1 y1 x 1 2 y 1 2
4. det 0 will suffice, as the general equation for a circle is
1 x 2 y2 x 2 2 y 2 2
1 x 3 y3 x 3 2 y 3 2
A B x C y Dx2 y2 0.
5. Let P r, be a point on the circle, so P Q a. By using the cosine rule, we have
a2 r2 r1 2 2 r r1 cos 1 .
6. Using the compound angle formula, we get r2 2 r r1 cos 1 cos 2 r r1 sin 1 sin r1 2 a2 0. By
altering 1 and r1 , we can change the coefficients of r sin and r cos to anything. Similarly, altering a
enables us to change the constant term. Multiplying out by a constant scaling factor enables the coefficient
of r2 to be changed. Hence, the general equation is simply A r2 B r cos C r sin D 0.
1 r2 r sin r cos
1 r1 2 r1 sin r1 cos
7. det 2
0.
1 r2 r2 sin r2 cos
1 r3 2 r3 sin r3 cos
1 r
8. The general spiral has equation A B r C 0, so an interpolating spiral is det 1 r1 1 0.
1 r2 2