Week 6   Projective Geometry
Projective Transformations

© Dana Scott 1993/1997/1998
Notebook  last edited: 25 September 1998

Representing projective transformations

Making a definition

Passing from 1 to 2 dimensions

In discussing projective transformations between ranges (or between pencils), we came to the following conclusion:

Theorem.  The following properties of a one-one correspondence between the points on one line and the points on another line (or between the lines in one pencil and the lines in another pencil or between the points on a line and the lines in a pencil) are equivalent:
	(i)   the correspondence is a composition of central projections;
	(ii)  the correspondence preserves crossratios;
	(iii) the correspondence is represented by a (non-singular) linear 			       transformation of relative homogeneous coordinates.

In other words, in the one-dimensional case there are three quite different, equivalent characterizations of projective transformations.

If we set up a presentation of higher-dimensional projective space, we could likewise say that a projective transformation between n-dimensional projective spaces is a composition of central projections in a still higher-dimensional space.  However, the success in using crossratios makes it unnecessary to to invoke higher dimensions.  We can use the following as a definition:

Definition. A projective (point) transformation of the 2-dimensional projective plane is a one-one correspondence between projective points such that 
	(i)   collinear points are mapped to collinear points; and
	(ii)  the crossratio of four collinear points is always preserved.

And there is a dual definition.

Definition. A projective (line) transformation of the 2-dimensional projective plane is a one-one correspondence between projective lines such that 
	(i)   concurrent lines are mapped to concurrent lines; and
	(ii)  the crossratio of four concurrent lines is always preserved.

The first question to ask here is:  Are the two definitions above unrelated?  or Do they somehow come to the same thing?

Another good question is:  Are projective transformations of the plane under this new definition represented by linear transformations of coordinates?

It is clear, byt the way, that a non-singular linear transformation always does represent a projective transformation, because it will be one-one on points and preserves crossratios by exactly the same proof we gave earlier for transformations between lines.

Relating the point and line versions

We can answer the first question directly.

Theorem.  Every projective point transformation determines a projective line transformation, and every projective line transformation determines a projective point transformation; moreover, passing from one type of transformation to the other and back again returns us to the same transformation.

Proof.  Let T be a projective point transformation.  A obvious mapping between lines is dertermined by taking a range of points on a given line to the (unique) line determined  by their images.  Let us call the corresponding line transformation T*.  Is this transformation one-onebetween all lines?  Is it projective?

First, we note that T will map the set of points on any line l onto the whole set of points lying on the image line T*[l].  To see this, take distinct points P, Q, and R on the line l.  Then T[P], T[Q], and T[R] must be distinct points on T*[l].  Take a fourth point S on l.  It corresponds uniquely to a crossratio s == RP[P, Q, R, S].  Since T preserves collinearity and crossratios, it follows that T[S] is on T*[l] and that we also have the same crossratio: s == RP[T[P], T[Q], T[R], T[S]].  This means that the image points realize all the possible crossratios there could ever be on the image line T*[l], and so they must map onto all the points of T*[l].

Now, if l and m are two distinct lines, then there is a unique point P at the intersection of the two ranges.  By what we just proved, T*[l] is the line dertermined by the images T[X] of all the points X on l  and consists exactly of  all the points in the image l.  Simillarly for m.  Thus, T[P] must be the unique point at the intersection of the two ranges T*[l] and T*[m].  So the two image ranges are distinct.

Note that this also proves that if T is a projective point transformation, and P, Q, and R are three points, then the points P, Q, and R are collinear if, and only if, the image points T[P], T[Q], and T[R] are collinear.  Because, if they are not collinear, then there are distinct lines passing through P and Q and through P and R.  Since the image lines are distinct, T[P], T[Q], and T[R] cannot be collinear.

Now, using the same argument, if n is a third distinct line concurrent with given lines l and m (say, at P), then T*[n] is concurrent with the lines T*[l] and T*[m] (at T[P]).  And, if the three lines are not concurrent, they intersect in pairs at three distinct, non-collinear points, so their images are not concurrent.  This proves that the lines l, m, and n are concurrent if, and only if, T*[l], T*[m], and T*[n] are concurrent.

If l' is any arbitrarily given line in the plane, pick two points P' and Q' on it.  They must be images of points P and Q under T.  Thus the line l' is the image of the line l joining P and Q under T*.  We can conclude that T* is indeed a one-one correspondence between all lines, and that it takes concurrent lines (non-concurrent lines) to concurrent lines (respectively, non-concurrent lines).  What about crossratios?

We are assuming that T preserves crossratios of collinear points, and we have to argue that T* preserves crossratios of lines as well.  Suppose that k, l, m, and n are four lines in a pencil making a certain crossratio a == RL[k, l, m, n].  Take a line not in the pencil, and intersect the four lines in points  K, L, M, and N.  Then, as we know by the Transfer Theorem, we have the same crossratio, thus, a == RP[K, L, M, N].  Now the transformations T* and T will map this configuration to lines  T*[k], T*[l], T*[m], and T*[n]in a pencil and to a quadruple of collinear points T[K], T[L], T[M], and T[N].  Because T preserves crossratios, we see that T* (as a line transformation) also preserves crossratios.

By a dual argument, if we start with a projective line transformation T*, then a projective point transformation T is determined by seeing where pencils go.  And if we start with T, determine T* and then redetermine a point transformation, it must be the same as T — just by following pencils.  Q.E.D.

Proving linearity

Now for the second question.  It takes a little work to relate coordinates along various lines to coordinates in the plane.

Theorem.  Every projective transformation of the projective plane is represented by a (non-singular) linear transformation of homogeneous coordinates.

Proof.  Let the transformation be T.  Consider the points represented by u and w and the other points a u + c w on the x-axis.  These points are transformed to collinear points on a transformed line.  We thus have a projective transformation between two lines, and we know it can be represented by a linear transformation.  This means that by a careful choice of representatives we can think that under T we have the correspondences
 		 u -> A, w -> C, a u + c w -> a A + c C.

Consider next the points represented by v and w and the other points b v + c w on the y-axis.  These points are transformed to collinear points on a transformed line.  We thus have a projective transformation between two different lines, and we know it can be represented by a linear transformation.  This means that by a careful choice of representatives we can think that under T we have the correspondences
 		 v->B',w->C',b v + c w->b B'+c C'.
Note that by recalling the theorem concerning lines and linear transformation, we cannot say at once that C==C' on account of the previous result.

However, since we are talking of a single transformation T of the whole plane, then C and C'have to represent the same point.  Therefore, we have a dependency, and we can write C==k C' for some particular scalar k.  Next let us define B==k B'.  So, if we replace the linear transformation between the y-axis and the image line by k times that transformation, we can think that under T we have the correspondences
 		 v -> B, w -> C, b v + c w -> b B + c C.

Let us next introduce coordinates for  A, B and C as follows A == (Subscript[a, 1]) u + (Subscript[b, 1]) v + (Subscript[c, 1]) w, B == (Subscript[a, 2]) u + (Subscript[b, 2]) v + (Subscript[c, 2]) w, and C == (Subscript[a, 3]) u + (Subscript[b, 3]) v + (Subscript[c, 3]) w.

Now, any point a u + b v + c w in the plane not on the line z can be captured as the intersection of two lines parallel to the axes, according to this calculation:

ClearAll[a, b, c, Subscript]; 
    PE[PE[v, a u + c w], PE[u, b v + c w]] // Factor

(We had to assume c ≠ 0 here to make sure there was an intersection.)

But, under the transformation T, we know which forms represent the images of those four points we see in this calculation.  So the point represented by the result of the calculation must transform to the point represented by the result of the following calculation:

\(\(Collect[#, {a, b, c}]&\)/@
      \((Tidy/@Factor[
            Release[Hold[PE[PE[v, a\ u + c\ w], PE[u, b\ v + c\ w]]] /. 

                				{u -> \((a\_1\ u + b\_1\ v + c\_1\ w)\), 

                  					v -> \((a\_2\ u + b\_2\ v + c\_2\ w)\), 

                  					w -> \((a\_3\ u + b\_3\ v + c\_3\ w)\)}]])
        \)\)

Note.  The Mathematica commands Hold and Release had to be employed above so that the computation by PE would be done after the indicated substitution.

This shows that the point represented by a u + b v + c w transforms under T to a point represented by a A + b B + c C — provided c ≠ 0.

But what about the point represented by a u + b v?  This is a point at the line at infinity, z == PE[u, v].  Such a point can be determined by the following kind of intersection:

PE[PE[u, v], PE[w, a u  +  b v  + w]]

But we already know representatives of the images under the transformation T of the the four points being used here, and so we can calculate by substitution again:

\(\(Collect[#, {a, b, c}]&\)/@
      \((Tidy/@Factor[
            Release[Hold[PE[PE[u, v], PE[w, a\ u\  + \ b\ v\  + w]]] /. 

                				{u -> \((a\_1\ u + b\_1\ v + c\_1\ w)\), 

                  					v -> \((a\_2\ u + b\_2\ v + c\_2\ w)\), 

                  					w -> \((a\_3\ u + b\_3\ v + c\_3\ w)\)}]])
        \)\)

This shows that the point represented by a u + b v transforms under T to a point represented by a A + b B.  We have therefore proved that in general the point represented by a u + b v + c w transforms under T to a point represented by a A + b B + c C.  But this means exactly that T is represented by a linear transformation.  Q.E.D.

Transformations and matrices

Point transformations by matrices

If P ia a point, then, in the scheme we have been using, it is represented by a linear form, say, P == a u + b v + c w.  The point coordinates of the point are of course {a, b, c}.  They can be calculated (in one way) by forming dot products with the the linear forms x, y, and z.  We call the procedure for doing this CP, and it has this code in the Implementation.nb:

CP[p_] := Apply[PD,{{x,p},{y,p},{z,p}},{1}];

If, on the other hand, l  is a line, then the line coordinates, CL[l], can be calculated with the dual dot products as follows:

CL[l_] := Apply[PD,{{l,u},{l,v},{l,w}},{1}];

If we have a list of points (or lines) of length n, then we can form an nx3 matrix of coordinates by these procedures:

MP[s_] := Map[CP,s];
ML[s_] := Map[CL,s];

Here are some examples of point and line coordinates using these functions:

ClearAll[a, b, c]; CP[3 u - 4 v + a w + b v]

tt = Union@@Outer[PE, {u, u + v, u + 2 v}, {v, v + w, v - w}]; 
    TableForm[tt]TableForm[ML[tt]]

Here are some additional trials:

\(ClearAll[a, b, c, Subscript]; 
    
{P\_1, P\_2, P\_3} = {a\_1\ u + b\_1\ v + c\_1\ w, 
        a\_2\ u + b\_2\ v + c\_2\ w, a\_3\ u + b\_3\ v + c\_3\ w}; \)

CP[(Subscript[P, 1])]

MatrixForm[MP[{(Subscript[P, 1]), (Subscript[P, 2]), (Subscript[P, 3])}]]

MatrixForm[ML[{PE[(Subscript[P, 2]), (Subscript[P, 3])], PE[(Subscript[P, 1]), (Subscript[P, 3])], PE[(Subscript[P, 1]), (Subscript[P, 2])]}]]

Now, as we noted earlier, every non-singular 3x3 matrix M determines a linear transformation of vectors, and hence determines projective point transformation.   The question is how to use the matrix to calculate the transformation on linear forms.

If the vector V gives the homogeneous coordinates of a point, then — by the convention we normally use in assigning coordinates to a transformation — the matrix multiplication V . M will give the coordinates of the image point.   The reason for stressing non-singularity is that the transformation should be everywhere defined.  Thus, if the vector V is non zero, then so should be V . M.  Moreover, the transformation should be invertible so that it is one-one.  The non-singular matrices are exaclty thouse that have inverses, and we know V . M . Inverse[M] == V.

With the primitive operations of linear algebra, however, a given matrix operates only on the vectors (coordinates).  We need to consider how this matrix also operates on linear forms (and, for later use, on polynomials in general).  And, in choosing this set-up, we have taken points as primary; we could just as well as taken lines first.  The two points of view, however, are easily related by means of duality with an explicit definition of dual matrix, as we will show.

The definition of the needed calculation is easy: the point P == a u + b v + c w is transformed to CP[P] . M . {u, v, w}, because the second dot is required to go back from coordinates to a linear uvw-form.  Let us take an example.

Consider the following matrix.  (Is it non-singular?)

\(M = {{1, 1, 1}, {1, 2, 3}, {1, 4, 9}}; 
M // MatrixForm\)

Here is the linear transformation given by M:

P = a u + b v + c w;
CP[P] . M . {u, v, w} // Tidy

However, we may interpret the rows of this matrix as being the coordinates of the images of the fundamental points u, v, and w.  Their coordinates are the obvious ones:

MP[{u,v,w}]//MatrixForm

Now, by the convention adopted, the image of u under the transformation given by M has exactly  the coordinates {1, 0, 0} . M.   Thus, it should be clear that, when we form the matrix product:

M.{u,v,w}

we are calculating dot products that give us the forms representing the images of all three  of the basis forms at the same time.

Conversely, if we have a triple of points and want the matrix that gives a transformation taking {u,v,w} to the given triple, we can use this kind of computation to find it:

MatrixForm[MP[{u + v + w, u + 2 v + 3 w, u + 4 v + 9 w}]]

Warning. Many vectors represent the same point, and in a similar way, many matrices represent the same transformation.  In fact, since any non-zero multiple of the vector V represents the same point, any non-zero multiple of the matrix M represents the same transformation, because the operation V . M is bilinear.

Next, to show how a mapping transforms (homogeneous) polynomial forms of arbitrary degree, it is simpler to use a substitution by substituting the new linear polynomials in for the fundamental ones.  We can program this transformation by simultaneous substitution very easily in Mathematica  as a function on any uvw-polynomials by the following command:

TP[m_]:=Tidy[#/.Thread[{u,v,w}->m.{u,v,w}]]&;

TP[M] is of course a linear transformation of linear uvw-forms.  (Why?)  We read TP[M] as: “the (projective) transformation with point matrix  mm”.   We note we will also need some additional notation for forming transformations in order to define them in a more geometric way.

This next example incidentially shows why it is convenient to define TP[M] as having a function as a value.

M = {{1, 1, 1}, {1, 2, 3}, {1, 4, 9}}; 
    TP[M]/@{u, v, w, a u + b v + c w, (u^2) + v w, 
          (((u - v + 2 w))^3)} // TableForm

To review what we have done, the relationship between point coordinates, matrix multiplication, and linear forms is fully established by the following symbolic equalities which  can be checked in Mathematica :

CP[TP[M][a u + b v + c w]] == {a, b, c} . MTP[M][a u + b v + c w] == {a, b, c} . M . {u, v, w}

In other words, we have two ways of writing the same thing: in terms of linear forms and in terms of vectors of coordinates.  But, there is also another point of view.

Comment 1.  Since, TP[M] is defined on polynomials by substitution, and since substitution preserves all ring operations on polynomials, this remark also proves that TP[M] is indeed a ring automorphism — or better an algebra automorphism, since TP[M] also preserves scalar multiplication.

Comment 2.  Conversely, every algebra endomorphism obviously works by substitution; and if such a mapping did not map the generators {u, v, w} to linear forms, it could not be surjective, since otherwise it would raise degrees.  Thus, all algebra automorphisms are of the form TP[M].

Compositions of transformations

Concerning the composition of transformations, the conventional definitions of matrix multiplication and the way we have utilized coordinates gives the following result:

Theorem.  Given matrices (Subscript[M, 1]) and (Subscript[M, 2]), then the two functions 
		TP[(Subscript[M, 1]) . (Subscript[M, 2])] and Composition[TP[(Subscript[M, 2])], TP[(Subscript[M, 1])]]
are the same function.

(Note the order!)  We will prove this by example, but it can also be proved in generality using symbolic matrices.  That is to say, in using matrix multiplication you have to read (Subscript[M, 1]) . (Subscript[M, 2]) as meaning first  do transformation (Subscript[M, 1]), and then do (Subscript[M, 2]).   In terms of coordinates, a vector V is mapped to the vector
		(V . (Subscript[M, 1])) . (Subscript[M, 2]) == V . ((Subscript[M, 1]) . (Subscript[M, 2])) 
under the composite transformation.

Perhaps here it is good to recall how Mathematica treats the composition of functions:

Composition[F, G][x]

The following commands in Mathematica  should be self-explainatory.

(Subscript[M, 1]) = {{0, 1, 0}, {0, 1, 1}, {1, 1, 0}}; (Subscript[M, 2]) = {{1, 1, 1}, {1, 2, 3}, {1, 4, 9}};

(Subscript[M, 1]) . {u, v, w}TP[(Subscript[M, 1])]/@{u, v, w}

TP[(Subscript[M, 2])]/@{v, v + w, u + v}MatrixForm[(Subscript[M, 1]) . (Subscript[M, 2])]

MatrixForm[(Subscript[M, 2]) . (Subscript[M, 1])]

(Subscript[M, 1]) . (Subscript[M, 2]) . {u, v, w}TP[(Subscript[M, 1]) . (Subscript[M, 2])]/@{u, v, w}Composition[TP[(Subscript[M, 2])], TP[(Subscript[M, 1])]]/@{u, v, w}

Corollary.  In view of the law of composition, the two transformations TP[M] and TP[Inverse[M]]must be inverses of each other — assuming, of course, that the matrix M is non singular.

Line transformations by matrices

Given the matrix (Subscript[M, 1]) of a point transformation, the next problem is to define the corresponding representation of the line transformation (or, more generally, the action of the transformation on the dual ring of xyz-polynomials).  That is, we have already defined TP[(Subscript[M, 1])] as an automorphism of the algebra of uvw-polynomials, and so, we should make TP[(Subscript[M, 1])] an automorphism of the algebra of xyz-polynomials.  The question is: which automorphism?

The algebraic answer is that TL[(Subscript[M, 1])] has to be defined sot that it acts dually to preserve the dot product between linear forms:  
		PD[TL[(Subscript[M, 1])][l], TP[(Subscript[M, 1])][P]] == PD[l, P] . 
We call this the Transformation Law.

Rewriting the above to use coordinates on both sides, this requirement means that we are looking for a matrix (Subscript[M, 2]) to operate on the line coordinates (in a dual way) so that: 
		CP[P] . (Subscript[M, 1]) . (Subscript[M, 2]) . CL[l] == CP[P] . CL[l]

Since the point and line coordinates are arbitrary, the universal validity of this equation means that the product (Subscript[M, 1]) . (Subscript[M, 2]) must be the identity matrix.  The answer we are looking for is that (Subscript[M, 2]) == Inverse[(Subscript[M, 1])].  Thus, the implementation we provide reads:

TL[m_] := 
      Tidy[#1 /. Thread[{x, y, z} -> {x, y, z} . Inverse[m]]]&

The implementation makes the Transformation Law hold by definition.  We now have to do some examples to check that this makes sense.  We again take the matrix we used earlier, but the reader can try another matrix on the same polynomials.

M = {{1, 1, 1}, {1, 2, 3}, {1, 4, 9}};

First think of a line and a point:

PD[3 x + 4 y - 7 z, u - 7 v - w]

The point is not on the line.  Here are the transforms:

TL[M][3 x + 4 y - 7 z]TP[M][u - 7 v - w]

And here is the PD computation:

PD[TL[M][3 x + 4 y - 7 z], TP[M][u - 7 v - w]]

The transformed point is also not on the transformed line.  And here is a symbolic computation:

ClearAll[a, b, c, Subscript]; \(l = a\_1\ x + a\_2\ y + a\_3\ z; 
P = b\_1\ u + b\_2\ v + b\_3\ w; 


    PD[l, P]\)PD[TL[M][l], TP[M][P]] PD[TL[M][l], TP[M][P]]  // Expand

The intermediate result looked bad, but for this particular matrix M the dot product is indeed preserved as desired.  Therefore, if P is a point on a line l, then TP[M][P] is a point on the line TL[M][l].  And the converse holds.  Moreover, any point on TL[M][l] can be found this way.  (Why?)  In general, we set things up so that because projective transformations (as we have represented and defined them using matrices) preserve PD, they preserve incidence of points and lines.  This gives us the geometric significance of the computations with matrices.

Note also the following immediate consequence of the transformation law by making a substitution and using the composition law:

Corollary.  If M is a non-singular matrix, and if P and is a linear uvw-forms, and l is a linear xyz-form, then:
	PD[TL[Inverse[M]][l], P] == PD[l, TP[M][P]] .

In the language of linear algebra, this means that the line transformation TL[Inverse[M]] is the adjoint of the point transformation TP[M].  This is to be interpreted in the sense of linear-space theory, where the two spaces of linear homogeneous polynomials are made dual spaces of one another under the pairing PD[l, P].

We next want to do some calculations of meets and joins of lines and points to see how well the matrix representation works out.  We again take the matrix we used earlier.

\(M = {{1, 1, 1}, {1, 2, 3}, {1, 4, 9}}; 
P\_1 = u - w; 

    P\_2 = u + v + 2\ w; 
l = PE[P\_1, P\_2]\)

A line has joined two points.  Let us transform it.

TL[M][l]

What about the line joining the transform of the two points?

PE[TP[M][(Subscript[P, 1])], TP[M][(Subscript[P, 2])]]

We see that the two polynomials are not the same, but they represent the same line — after multiplying one of them by the scalar 2.  (Try it with another matrix!)  This holds generally.   Geometrically this means that the image of the line joing two points is the line joining the image of the two points.  In other words, projective transformations preserve joins (and meets), as is intended.  What we are checking here is that the computations do indeed work out in special cases.

Here are some other calculations with more general points and lines.  We note that the scalar factor that comes up in comapring linear forms is the determinant of the matrix.

Det[M]

\(P\_1 = a\_1\ u + a\_2\ v + a\_3\ w; 

    P\_2 = b\_1\ u + b\_2\ v + b\_3\ w; 
\(TL[M]\)[PE[P\_1, P\_2]]\)

PE[TP[M][(Subscript[P, 1])], TP[M][(Subscript[P, 2])]] // Tidy

Here is a dual calculation:

\(l\_1 = c\_1\ x + c\_2\ y + c\_3\ z; 

    l\_2 = d\_1\ x + d\_2\ y + d\_3\ z; 
\(TP[M]\)[PE[l\_1, l\_2]]\)

PE[TL[M][(Subscript[l, 1])], TL[M][(Subscript[l, 2])]] // Tidy

Or we can try a completely general symbolic matrix and verify the law that says that after transformation, exterior products are multiplied by the determinant of the matrix.

\(M = {{r\_1, r\_2, r\_3}, {s\_1, s\_2, s\_3}, {t\_1, t\_2, t\_3}}; 

    MatrixForm[M]\)det = Det[M]

Now here is a calculation that takes quite a lot of algebra (and Simplify had to be put to work to cancel fractions) :

\(P\_1 = a\_1\ u + a\_2\ v + a\_3\ w; 

    P\_2 = b\_1\ u + b\_2\ v + b\_3\ w; 


    \(det\ \(TL[M]\)[PE[P\_1, P\_2]]\  // Simplify\) // Tidy
\)PE[TP[M][(Subscript[P, 1])], TP[M][(Subscript[P, 2])]] // Expand // Tidy

This has been a proof of the following theorem about linear forms:

Theorem.  If M is a non-singular matrix, and if (Subscript[P, 1]) and (Subscript[P, 2]) are linear uvw-forms, then:
	PE[TP[M][(Subscript[P, 1])], TP[M][(Subscript[P, 2])]] == 
        Det[M] TL[M][PE[(Subscript[P, 1]), (Subscript[P, 2])]]

And of course there is a dual theorem for xyz-forms.  In fact, in some presentations of Linear Algebra, an equation like the above is used to define the determinant of a matrix  We had other definitions to use, and so we verified this law.  Geometrically, it says that the line joining the transforms of two points is the transform of the line joining the original points.  We have perhaps not learned much new out of this, but we have seen that the algebra is coherent.

Algebraically, linear substitution is an automorphism of the algebra structure of the polynomial ring, and this holds for the uvw-polynomials as well as for the xyz-polynomials.  So far we have been thinking in terms starting with the points rather than the lines.  In other words, we have to start with M coming about this way:
		M == MP[TP[M]/@{u, v, w}]

and then we know how to go from the transform TP[M] to the appropriate transformation on lines, TL[M].  The question is how to go the other way.

To understand this, let us see what a typical M does to the xyz-basis.

M = {{1, 1, 1}, {1, 2, 3}, {1, 4, 9}}; TL[M]/@{x, y, z}

In other words, suppose we see in front of us the images of the three basic lines.  These images give us the following matrix:

\(M\_0 = ML[%]; 
M\_0 // MatrixForm\)

But, if we are thinking of point transformations, then we should treat line coordinates as dual vectors to point coordinates.  This means that we really should take the transpose of the matrix (Subscript[M, 0]).  Now, if we further take the inverse, then we will get back to the standard matrix of  the required point transformation.

Inverse[Transpose[(Subscript[M, 0])]] // MatrixForm

In other words, if you know where the lines x, y, z are going, then make a matrix (Subscript[M, 0]) out of their coordinates.  The line transformation can then be calculated as TL[Inverse[Transpose[(Subscript[M, 0])]]].

Transforming quadrangles and quadrilaterals

Mapping quadrangles

Moving points

Consider the matrices:

\(M\_1 = {{1, 1, 1}, {1, 2, 3}, {1, 4, 9}}; 

    M\_2 = {{a, 0, 0}, {0, b, 0}, {0, 0, c}}; \)

Now calculate:

(Subscript[M, 2]) . (Subscript[M, 1]) // MatrixForm

The matrices (Subscript[M, 1]) and (Subscript[M, 2]) . (Subscript[M, 1]) are quite different, though related.  Clearly the second is formed from the first by multiplying the rows each by a different scalar.  Let us see what the matrices do to a certain set of points:

TableForm[{TP[(Subscript[M, 1])]/@{u, v, w},TP[(Subscript[M, 2]) . (Subscript[M, 1])]/@{u, v, w}}]

The linear forms u, v, and w are mapped to different linear forms under the two matrices, but the results are equivalent representations of the same  three image points.   So, as projective transformations, the point mappings associated with (Subscript[M, 1]) and (Subscript[M, 2]) . (Subscript[M, 1]) are equal on one triple of points.  But, as we have to stress over and over, this does not mean that they are the same projective transformation.

Let us see, indeed, what happens to another point, say, u + v + w.

TP[(Subscript[M, 1])][u + v + w]TP[(Subscript[M, 2]) . (Subscript[M, 1])][u + v + w]//Tidy

This can also be calculated as:

{a, b, c} . (Subscript[M, 1]) . {u, v, w}

The matrix (Subscript[M, 1]) maps the point u + v + w to a certain place, but (Subscript[M, 2]) . (Subscript[M, 1]) puts it in quite another place.  In fact, we see from the third matrix form of the expression that, since (Subscript[M, 1]) is non singular, then {a, b, c} . (Subscript[M, 1]) can equal any  vector we want.

Thus, by chossing these multipliers, (Subscript[M, 2]) . (Subscript[M, 1]) is free to move the point represented by the form  u + v + w  anywhere we desire.  One conclusion is that, therefore, three points and their images do not determine a projective transformation of the plane.

Theorem.  The projective transformation TP[(({{a, 0, 0}, {0, b, 0}, {0, 0, c}}))] keeps the points represented by u, v, and w fixed, but it moves the point corresponding to the linear form u + v + w to any other position, namely a u + b v + c w (via  the choice of the three multipliers a, b, and c) .

Moving quadrangles

This theorem can then be improved to:

Corollary 1.  Given four points, no three of which are collinear, represented by linear forms  P, Q, R, and S, then there is a matrix M so that the projective transformation TP[M] moves the quadruple of points represented by {u, v, w, u + v + w} to the quadruple represented by {P, Q, R, S}.

Proof.  First we note that P, Q, and R are linearly independent.  So there is a matrix (Subscript[M, 1]) so that we have 
	TP[(Subscript[M, 1])][u] == P,
	TP[(Subscript[M, 1])][v] == Q,
	TP[(Subscript[M, 1])][w] == R.

But we would find that (Subscript[S, 1])==TP[(Subscript[M, 1])][u + v + w] does not represent the desired point.  Let instead (Subscript[S, 2])==TP[Inverse[(Subscript[M, 1])]][S].  Now choose (Subscript[M, 2]) so that TP[(Subscript[M, 2])] maps {u, v, w, u + v + w} to {a u, b v, c w, (Subscript[S, 2])}, for a suitable choice of scalars {a, b, c}.  We then let (Subscript[M, 3]) == (Subscript[M, 2]) . (Subscript[M, 1]).  This matrix then satisfies the theorem, because TP[(Subscript[M, 3])] maps {u, v, w, u + v + w} to {a P, b Q, c R, S}.  Q.E.D.

Corollary 2.  Given four points, no three of which are collinear, represented by linear forms  P, Q, R, and S, and another such quadruple P', Q', R', and S', then there is a matrix M so that the projective transformation TP[M] moves the quadruple of points represented by {P, Q, R, S} to the quadruple of points represented by {P',Q',R',S'}.

Proof.  Move back and forth to the points represented by the standard quadruple {u, v, w, u + v + w}, and then compose the transformations.  Q.E.D.

Suppose we have two, non-degenerate quadrangles.  Can there be inequivalent matrices defining maps that take one to the other?

Theorem.  A projective transformation of the form TP[mm] is uniquely determined by four non-collinear points and their images, and two matrices determine the same projective transformation if, and only if, one is a scalar multiple of the other.

Proof.  Since any quadrangle can be mapped to or from the standard quadrangle {u, v, w, u + v + w}, this is the same as asking whether there are matrices not equivalent to the identity matrix that map this  particular figure onto itself.  (Permuting vertices is not allowed:  u has to go to something equivalent, and the same must be true of the other points.)

Suppose the matrix M representing the transformation carrries {u, v, w} to {a u, b v, c w}.  Then the matrix has to be 
			M==(({{a, 0, 0}, {0, b, 0}, {0, 0, c}})).  
But the transformation represented by this matrix carries the form u + v + w to a u + b v + c w.  For these points to be equivalent, the multipliers a, b, c all have to be equal.  Therefore, the matix is indeed equivalent to the identity matrix.  Q.E.D.

To make calculations, we needed to implement these matrix manipulations.  THis has been done in Implementations.nb.  Supposing we are given the following two quadrangles:

\(Q = {u + v, v + w, w + u, u + v + w}; 

    R = {u - 2\ v, v - 2\ w, w - 2\ u, u + 2\ v + 3\ w}; \)

Using the idea of keeping three points fixed and moving the fourth, we can implement the finding of the matrix of the transformation that will map the first given quadrangle to the second.

The operation is called MQP, standing for “matrix for quadrangles of points”.  We test this out here.  (And the reader can easily change the cooeficients in the linear forms to give other tests, as well as look at the code.)

\(M = MQP[Q, R]; 
M // MatrixForm\)

Factor /@ (TP[M]/@{u+v, v+w, w+u, u+v+w})

Except for some fractional multiples, the first quadrangle Q as been moved to R.

Mapping quadrilaterals

Doing calculations

Using the same kind of martix manipulations as with quadrangles given by points, we have implemented the dual procedure of finding of the transformation that will map one given quadrilateral to another.  (Of course, we had to translate back from the dual matrix in order to put things in a standard form.)  Here is an example

\(K = {x + y, y - z, z + 2\ x, 3\ x + 4\ y + 5\ z}; 

    L = {2\ x - y, 2\ y - z, 2\ z - x, x - y - z}; 
M = MQL[K, L]; 

    M // MatrixForm\)

Factor/@TL[M]/@K

This is seen to be a list of lines equivalent line by line to those in L.  This means that TL[M] is doing the right thing.

We now going to put all of this to the acid test by converting the quadrilaterals into quadrangles, doing the calculations the first way, and then seeing if the results are the same.  The reasoning here is that mapping the given edges of a quadrilateral (regarded for the moment as a 4-gon) is the same as mapping the four vertices.  Well, we shall see!

By the way, the operation PES applies the PE or join operation to the sequence of points in circular order, thus finding the sides of a polygon.  This is how we pass from the given points to the lines they determine.

V = PES[K]W = PES[L]

Factor/@TP[M]/@V

So far so good: at least M is doing its job.   What we do next is try to prove that if we compute the quadranglematrix by using the vertices, then we get a scalar multiple of M.

Inverse[M].MQP[V,W]//MatrixForm

And it is a win!

Three points and a line

But here is a different problem.

Question. Suppose you are given three points (not collinear) and a line (that does not contain any of the points), and suppose you want to map this structure by a projective transformation to another of the same kind.   Is it possible?

Solution.  Well, the three points form a triangle, and the given line is not concurrent with any two of the sides of the triangle.  So the four lines (the given line plus the three sides of the triangle) form a non-degenerate quadrilateral.  This figure can be mapped to any other non-degenerate quadrilateral, say, one determined by three other points (not collinear) and another line (that does not contain any of the points).  Since  projective transformations preserve meets of lines, the first triple of points will be moved to the second triple, and the first special line will be moved to the second. Q.E.F.

We work out a simple example starting with a standard triangle and line.

\(M = 
      MQL[Join[PES[{u, v, w}], {x + y + z}], 
        Join[PES[{u, v, w}], {x - y + z}]]; 
M // MatrixForm\)

TP[M]/@{u, v, w}

TP[M]@(a u + b v + c w)

TL[M]@(a x + b y + c z)

Here is another example.

\(M = 
      MQL[Join[PES[{u, v, w}], {x + y + z}], 
        Join[PES[{u, v, u + v + w}], {x - y + z}]]; 
M // MatrixForm\)

TP[M]/@{u, v, w}

TP[M][a u + b v + c w] // Tidy

TL[M][x + y + z] // Tidy

TL[M][a x + b y + c z] // Tidy

Now here is a possible degenerate case.

Question.  We want to map three points and a line to another such figure.  Suppose, however, the line passes through one of the points but not through two of the points.  In this case the quadrilateral is degenerate.  Are there transformations not equivalent to the identity which leave this figure fixed?

Solution.  Yes!  Suppose the three points are u, v, and w.   The sides of the triangle are therefore z, x, y.  A line passing through w will have the form a x + b y, and it intersects the opposite side z of the triangle in the point represented by b u - a v.  Call that point P.

If we suppose the line does not pass either through u or v, then we can suppose neither of a or b is zero.  There are many lines passing through P different from the given line and different from z.

Indeed the lines through P all have the form  a c x + b c y + d z.  Two distinct lines both different from the given one and from z are:
		a x + b y + z and a x + b y - z.

Taking the sides of the triangle and one of these lines forms a non-degenerate quadrilateral.  This can be moved to the other quadrilateral obtained by using the other line.  This transformation will leave the original triangle fixed as well as the point P.  It therefore leaves the line z pointwise fixed and it leaves the line a x + b y fixed.  Q.E.F.

We now do the calculations to demonstrate such a case:

\(M = MQL[{z, x, y, a\ x + b\ y + z}, {z, x, y, a\ x + b\ y - z}]; 

    M // MatrixForm\)

TP[M]/@{u, v, w, b u - a v, u + v + w}

Thus, the point u+v+w is not left fixed.

TL[M][a x + b y]

PE[a x + b y, z]