Affine Geometry

by
Rolf Sulanke

Started Dec 11, 2016
Finished Jan 3,2017
Mathematica V. 11.01

Preface

This notebook contains a Mathematica model of H. Weyl’s  Foundation of Affine Geometry, § I.2, see also [OSI], § 4.3. It illustrates this model showing selected applications. It is not meant to be a systematic treatment of affine geometry.

Preparation

Before starting the first session insert the address of your working directory, e.g. for Windows 7:

SetDirectory["E:\\mymath\\diffgeo\\EuclSfTheory"]

For Linux:

SetDirectory["~/mymath/diffgeo/EuclSfTheory"]

Regard  eventually deviating notations depending on your operating system! Ensure that the corresponding cell is an initialization cell, and the other cell doesn’t have this property (Menu Cell/ Cell Properties).

Now save the notebook with your changes.

Start Initialization

Start the session with the menu entry
Evaluation/Evaluate Initialization Cells

Needs["tensalgv3`"]

We willmainly  consider 3-dimensional geomey, thus we define the dimension dim = 3; this value may be changed during the session.

dim = 3;

Context[dim]

tensalgv3.m

Here is a List of all symbols defined in tensalgv3.m click an item of the table to see the usage of the symbol

?tensalgv3`*

1. Point- Vector Axioms

1.1. Points and Vectors

Let K denote a field, in the applications often the field of real or complex numbers, and (K^(n ))the n-dimensional vector space of the n-tuples with values in K,  e.g.

vec[x]∈ (K^3)

The default value of n = dim, set in the Global Context:

dim

Context[dim]

In geometry or physics such n-tuples mostly appear as coordinates of points or vectors. In affine geometry one has to distinguish points and vectors: points are the elements of the space containing the geometric objects, and vectors are operations in this space, interpreted as translations. Thus we define as Mathematica models of points the (n+1)-tuples

point[x_]:= Prepend[vec[x],1]

?point

point[x]

The set of all points point[x] is named the affine space (A^dim).

vector[x_]:= Prepend[vec[x],0]

?vector

vector[x]

The set of all vectors vector[x] is named the 
affine vector space (V^dim)≈(K^dim).

The addition of vectors yield a vector again:

vector[x]+vector[y] == vector[plus[x,y]]

Here we have to use the function plus

?plus

defining the addition of functions; x+y is not defined as a function:

vector[x]+vector[y] == vector[x+y]

TrueQ[(x+y)[3]==x[3] + y[3]]

TrueQ[plus[x,y][3]==x[3] + y[3]]

a*vector[x]== vector[times[a,x]]

a*vector[x]== vector[a*x]

Here we needed the function times since the Mathematica operation * (= Times) doesn’t define a product function

TrueQ[(a*x)[3]==a*x[3] ]

TrueQ[times[a,x][3]==a*x[3] ]

?times

Clearly, with x[i], a ∈ K the set of all vectors satisfy the axioms of an 3-dimensional (in general d-dimensional, d = dim) vector space. The standard  basis is

vbas[i_] := stb[i+1,dim +1]; Table[vbas[i],{i,dim}]

The vectors operate as translation of points:

Clear[trans];

trans[a_][x_]:=Module[{},
If[Not[(Head[a] == List)&&(Head[x]== List)&&(Length[x]==Length[a])],
Print["Invalid arguments!"];Return[]];
If[Not[(a[[1]]==0)&&(x[[1]]==1)],Print["Invalid arguments!"];Return[]];a+x]

trans[vector[a]][point[x]]

trans[vector[b]][trans[vector[a]][point[x]]]

%==trans[vector[a]+vector[b]][point[x]]

trans[vector[-a]][trans[vector[a]][point[x]]]==point[x]

trans[null[dim+1]][point[x]]==Identity[point[x]]

Solve[trans[vector[y]][point[x]]==point[x],vec[y]]

We conclude
Proposition 1. The map vector[a] ↦ trans[vector[a]  is an isomorphism of the Abelian group (V^dim) onto a subgroup of the group of transformations of the affine point space (A^dim).  The transformation trans[vector[a]] is named the translation of (A^dim) with vector[a]. ■

Consider

vector[(t+s)*a]== vector[t*a] + vector[s*a]

which is nonsense in Mathematica. The correct formulation in Mathematica is

Simplify[vector[plus[times[s,a],times[t,a]]] ==vector[times[s,a]] +vector[times[t,a]] ]

For real numbers the identity is confirmed directly:

vector[7.*a] ==7.* vector[a]

vector[7*a] ==7.* vector[a]

vector[7a]== 2.*vector[a] +5.*vector[a]

One easily shows
Lemma 1. For fixed vector[a] the map

t∈ K ↦( vector[times[t,a]]∈(V^dim))

is a homomorphism of the additive group [K,+] of the field K into the additive group [(V^dim),+]of the vector space (V^dim); the image is trivial (only the null vector), if vector[a] is the null vector. If this is not the case, the homomorphism is injective; the image of the map

t∈ K ↦ trans[vector[times[t,a]]]

is  named the 1-parametric subgroup of the translation group of (A^dim)   spanned by vector[a]. ■

The orbits of the 1-parametric translation groups are the lines:

Clear[a,b,t];line[vector[a_],point[b_]][t_]:=trans[vector[times[t,a]]][point[b]]

trans[vector[times[t,a]]][point[b]]

line[vector[a],point[b]][t]

line[vector[a],point[b]][t]/.{a[i_] ->1, b[i_]->i}

Take[line[vector[a],point[b]][t],-3]/.{a[i_] ->1, b[i_]->i}

ParametricPlot3D[%,{t,0,3}]

Points may be subtracted:

point[b]-point[a]

Lemma 2. The difference point[b]-point[a]  is the uniquely defined vector translating point[a] to point[b].
Proof.

point[b]-point[a]== vector[plus[b,-a]]

trans[vector[plus[b,-a]]][point[a]]==point[b]

Solve[trans[vector[x]][point[a]]==point[b],vec[x]]

■

Traditional the vector translating pa=point[a] into pb=point[b] is denoted as

(Overscript[pa pb, ⟶]) := pb -pa

Using the introduced concepts it is easy to verify the statements contained in H. Weyl, § 1.2 or [OSI], § 4.3.

Example 1. Generally, the addition of points does not yield a point, since the sum of the tuples of the point coordinate tuples will not have 1 as the  first component.  But for a family of m points

Clear[𝔉];𝔉[m_]:=Table[point[p[i]],{i,m}]

𝔉[5]

the normed sum

Sum[point[p[i]],{i,5}]/5

is a point again; it may be called the affine center of the finite point family. Of course it is defined only for m≠ 0; for simplicity we suppose that the characteristic of the field K is zero. A Mathematica function calculating the affine center is

cgeo[p__] := Module[{m = Length[{p}], ft,i,k},
ft= {p};k=Length[ft[[1]]];  For [i =1, i<m+1,i++,
If[(ft[[i]][[1]]≠ 1), 
Print["Invalid argument ",ft[[i]]," !"]; Return[]]];
 For [i =1, i<m+1,i++,If[(Length[ft[[i]]]≠k), 
Print["Dimensions of points differ!"]; Return[]]];
Sum[ft[[i]],{i,m}]/m]

?cgeo

cgeo[point[a],point[b,2]]

cgeo[point[a],point[b]]

cgeo[point[p[1]],point[p[2]],point[p[3]],vector[c]]

cgeo[point[p[1]],point[p[2]],point[p[3]]]

cgeo[stb[1,4],{1,1,0,0},{1,0,1,0},{1,0,0,1},stb[2,4]]

cgeo[stb[1,4],{1,1,0,0},{1,0,1,0},{1,0,0,1}]

■
Example 2. A generalization is the barycenter of a family of mass points {m[i], b[i]]}, i=1,...,n}, m[i] the mass of the point b[i]. We define (compare Exercise  4.5.5 in [OSI]) a module calculating the barycenter:

cbary[p__][m__]:=  Module[{mm = Length[{p}], ft,i,M},
ft= {p};
k=Length[ft[[1]]];  For [i =1, i<mm+1,i++,
If[(ft[[i]][[1]]≠ 1), 
Print["Invalid argument ",ft[[i]]," !"]; Return[]]];
 For [i =1, i<mm+1,i++,
If[(Length[ft[[i]]]≠k), 
Print["Dimensionsof points differ!"]; Return[]]];
If[Length[{m}]≠ mm, Print["Masses incorrectly defined!"];Return[]];
M=Sum[{m}[[i]],{i,mm}];
If[M==0,
 Print["Sum[",{m}, " equals zero!"];Return[]];
Sum[{m}[[i]]*ft[[i]],{i,mm}]/M]

?cbary

If the number of mass arguments does not equal the number of points we get an error message:

cbary[stb[1,4],{1,1,0,0},{1,0,1,0},{1,0,0,1}][1,-1,1]

cbary[stb[1,4],{1,1,1,0},{1,0,1,2},{1,0,0,1},{1,2,9,3}][1,-1,3,3,1]

cbary[{1,1,1,0},{1,0,1,2},{1,0,0,1},{1,2,9,3},stb[1,3]][1,-1,3,3,1]

cbary[stb[1,3],{1,1,1,0},{0,0,1,2},{1,0,0,1},{1,2,9,3}][1,-1,3,3,1]

If the sum M = Σ (Subscript[m, i]) equals zero we get an error message:

cbary[stb[1,4],{1,1,0,0},{1,0,1,0},{1,0,0,1}][1,-1,2,-2]

■

A frame in an affine geometry consists of a point p0 and a basis vb[i], 
i =1,,...,dim, of the vector space. The standard frame consists of the origin

stbpt[0] = stb[1,dim+1];

and the standard basis

stvb[i_,d_:dim ]:=stb[i+1,d+1]

Now we consider the base points of the frame:

bp[0] :=p0;bp[i_] := p0+ vb[i]/;i>0

For the standard frame we have

stbpt[i_]:=stbpt[0] +stvb[i]/;i>0

stbpt[0]

stbpt[2]

The barycenter of the mass points (stbpt[i],m[i]], 
i=0,...,dim is (in case dim = 3)

bcf[m0_,m1_,m2_,m3_] :=cbary[stbpt[0],stbpt[1],stbpt[2],stbpt[3]][m0,m1,m2,m3]

bcf[m0,m1,m2,m3]

Obviously

Simplify[bcf[m0,m1,m2,m3]== bcf[a*m0,a*m1,a*m2,a*m3],a≠ 0]

We show 
Proposition 1. for any point {1,x,y,z} of the affine space (A^dim) there exists a mass distribution {m0,m1,..,mdim} such that the barycenter

bcf[m0,m1,m2,m3]== {1,x,y,z};

Two solution (m0,m1,m2,m3) of this equation differ by a common factor.
Proof. Consider the solution of

Solve[cbary[stb[1,4],{1,1,0,0},{1,0,1,0},{1,0,0,1}][m0,m1,m2,m3]== {1,x,y,z},{m0,m1,m2,m3}]

sol ={m0,m1,m2,m3}/.Flatten[%]

and this is the solution

Simplify[cbary[stb[1,4],{1,1,0,0},{1,0,1,0},{1,0,0,1}][sol/.List->Sequence]]

■
The solutions {m0,m1,m2,m3} are defined up to the common factor m0≠0 are named the homogeneous barycentric coordinates of the point {1,x,y,z}.

1.2. Affine Transformations

Let K be a field of characteristic zero or char[K] >2 and [(A^n), V,K], n>1, an affine space with vector space V over K. An affine transformation f: (A^n) →(A^n) is defined to be a bijective map transforming lines into lines and preserving the affine ratio of parallel line segments.  In case of the real field K=R the line invariance implies the ratio invariance. It can be shown that such a map can be presented in Cartesian coordinates x ↦(x[i]), y = f[x]↦(y[i]) in the form

Clear[f];f[vec[x_]]:= vec[b] +matrix[a].vec[x];f[vec[x]]

or

y[i_] :=b[i]+ Sum[a[i,j]*x[j],{j,dim}]; y[2]

The coordinates of the images of the base points of the standard frame are, with

δ[i_,j_]:=KroneckerDelta[i,j]

the image of the origin po

f[vec[x]]/.x[i_]-> 0

and the images of the unit points pi = po +stb[i]

f[vec[x]]/.x[i_]-> δ[1,i]

f[vec[x]]/.x[i_]-> δ[2,i]

{a[1,2]+b[1],a[2,2]+b[2],a[3,2]+b[3]}

f[vec[x]]/.x[i_]-> δ[3,i]

Any affine transformation induces a linear transformation of the vector space, namely

(Subscript[a, f])[vec[x_]]:= matrix[a].vec[x]; (Subscript[a, f])[vec[x]]

All these maps are bijective; therefor we  assume

Det[matrix[a]]≠ 0

These well known results in linear algebra can  be seen e.g. in [OSI], Chapters 4, 5, in particular formula (5.1.14), or [OS3], Section 1.5, Proposition 1.5.6, and formulas (1.5.10 - 12).

Using the point- vector functions introduced in Subsection 1.1 we will create a Mathematica Module corresponding to the embedding of the affine group of the n-dimensional affine space as a subgroup of the general linear group GL[n+1, K]  of all  isomorphisms of the vector space (K^(n+1)). We remember that a  frame in the affine space consists of a point p, the origin of the frame, and n = dim linearly independent vectors, the basis 
(a[i]), i = 1,..., dim of the frame. We start with the standard frame, po = o the origin and a[i] = stb[i].  Given the affine transformation f we put the coordinates of the point f[o] and the coordinates of the basis vectors

(Subscript[a, f])[stb[i]] :=f[pi] -f[po]

into the columns of a square matrix of order dim +1, numbered with 
i = 0,,..., ,dim. Such a matrix can be constructed using the built-in function

?Array

Clear[afftr];afftr[a_,b_,d_:dim]:= Module[{aa,i,j},
If[(Head[b]==List)&&Dimensions[b]== {d},For[i=1,i<d+1,i++,aa[i_,0]:= b[[i]]],
Print["Invalid argment ",b," !"];Return[]];
If[Not[(Head[a]==List)&&(Dimensions[a]== {d,d})],
Print["Invalid argment ",a," !"];Return[]];For[i=1,i<d+1,i++,For[j=1,j<d+1,j++,aa[i,j]= a[[i,j]]]];
aa[0,0]=1;
For[j=1,j<d+1,j++,aa[0,j]=0];
Array[h,{d+1,d+1},{0,0}]/.h[i_,j_]->aa[i,j]]

?afftr

Consider

ab=afftr[a,b]

Clear[a,b,ab];ab=afftr[matrix[a],vec[b]]

ab//MatrixForm

ab acts  correctly for points and vectors. ab applied to a vector yields the image vector corresponding to (Subscript[a, f])[vec[x]]:

ab. vector[x]

ab. vector[x]== Prepend[matrix[a].vec[x],0]

ab. point[x]//MatrixForm

and this coincides with the formula considered above.

Simplify[ab.point[x]== point[b]+ab. vector[x]]

Proposition  2.  Each map (Subscript[f, ab]) defined by

point[x]∈(A^n) ↦ (Subscript[f, ab])[point[x]]:

ab= afftr[matrix[a],vec[b]];(Subscript[f, ab])[point[x_]]:=ab.point[x]

with

Det[ab] ≠ 0; Det[ab]== Det[matrix[a]]

is an affine transformation of (A^n), n = dim.  The map

Φ: ab ↦(Subscript[f, ab])

is an isomorphism of the subgroup of all matrices of the shape afftr[matrix[a], vec[b]] onto the group of the affine transformations of (A^n).

Proof. Clearly, since the map (Subscript[f, ab]) is linear in the argument vector[x] and the determinant of ab is not zero, the map is an affine transformation. We show that the matrices of shape afftr[a,b], a ∈ GL[n,K], b∈(K^n), form a subgroup of GL[n+1,K]. Indeed, the product

Clear[bb,a, ac,b,c]; bb=afftr[matrix[ac],vec[c]].afftr[matrix[a],vec[b]]

%==afftr[matrix[ac].matrix[a],matrix[ac].vec[b]+vec[c]]

belongs to the subgroup.

Simplify[afftr[matrix[ac],vec[c]].(ab.point[x])== bb.point[x]]

The product of the matrices corresponds to the composition of the affine maps, thus Φ is a homomorphism. The inverse matrix belongs to the matrix subgroup and yields the inverse affine transformation:

Simplify[Inverse[ab]]//MatrixForm

%[[1]]

Simplify[%%.(ab.point[x])== point[x]]

Thus the inverse map corresponds to the inverse matrix and this belongs to the subgroup. The identity matrix has the requested shape and Φ maps it on the identity map of (A^n). Conversely,if the map (Subscript[f, ab]) is the identity map, then the images of the base points stbpt[i] are

p[0] = stb[1, 4]; p[i_Integer] := stb[1, 4] + stb[i + 1, 4]/; i>0

p[0]

ab.stbpt[0] -stbpt[0]== null[4]

It follows that vec[b] is the null vector. Furthermore, the matrix

Table[ab.stbpt[i] -stbpt[i],{i,0,3}]/.b[i_]-> 0

must be the null matrix:

Solve[Flatten[%]==null[16],Flatten[matrix[a]]]

such that  the solution

matrix[a]/.Flatten[%]//MatrixForm

must be the unit matrix.  Thus the kernel of the homomorphism Φ is trivial:

afftr[IdentityMatrix[3],null[3]]//MatrixForm

Φ is an isomorphism. ■

The group of the affine transformations of the affine space (A^n) over  K and its  isomorphic matrix group are named the affine group in dimension n over K and denoted by or by 𝔸[n] if K  = R.

Take an arbitrary affine transformation:

afftr[matrix[a],vec[b]]

Then the images of the origin and the  standard base vectors are a frame with the point

afftr[matrix[a],vec[b]].stbpt[0]

and the basis vectors:

Table[afftr[matrix[a],vec[b]].stvb[i],{i,1,dim}]

Indeed, these vectors are linearly independent since

Det[≠≠matrix[a]]≠ 0

is supposed. Conversely, if an arbitrary frame is given, then there exists a uniquely defined affine transformation transforming the standard frame into the given frame:  The columns of the matrix afftr[matrix[a],vec[b] must be the coordinates of the given frame with respect to the standard frame.Thus we proved:

Proposition 3. Let [(A^n), (V^n), K] be an affine geometry over a field K. Fix an arbitrary frame and consider the Cartesian coordinates with respect to this frame. Then it becomes the standard frame

po =stbpt[0];vb[i_]:= stvb[i]

Then the map

ϕ:f ∈ 𝔸[n,K]↦ ϕ[f]:= {f[po],f[vb[1]],...,f[vb[n]]}∈ 𝔽[(A^n)]

is a bijection of the affine group  𝔸[n,K] onto the set 𝔽[(A^n)] of all frames of the affine space (A^n).

Proof. Since the affine transformation is linear with non-zero determinant, the image of the standard frame is a frame again. Conversely, let

qp[0] = point[x]; qvb[i_] := vector[a[i]]/;i>0

be an arbitrary frame. Consider the matrix

mxa :=Transpose[Prepend[Table[qvb[i],{i,dim}],qp[0]]]

mxa//MatrixForm

Since the vectors are linearly independent, we have Det[mxa]≠0, thus the matrix defines an affine map satisfying

mxa.stbpt[0]== qp[0]

mxa.stvb[1]== vector[a[1]]

mxa.stvb[2]== vector[a[2]]

mxa.stvb[3]== vector[a[3]]

Therefore the map ϕ is surjective, and obviously injective. ■

The definition of mxa shows that after fixing an arbitrary frame the set 𝔽[(A^n)] of all frames can be identified with the affine group which acts simply transitive on 𝔽[(A^n)]. Thus any subgroup  G of the affine group acts simply transitive on each orbit of G in 𝔽[(A^n)]. In particular this can be applied to the Euclidean group 𝔼[n]:

Example 3. Consider the Euclidean space (E^3), K= R the field of real numbers, see e.g. [OSI], Chapter 6. Choose the fixed frame consisting of the origin o and an orthonormal basis:

fro: o = stbpt[0]; stvb[i];

Then the Dot product defines a positively definite scalar product on the real vector space with respect to it the standard basis is orthonormal:

Table[stvb[i].stvb[j],{i,dim},{j,dim}]//MatrixForm

Then, since the Euclidean group 𝔼[n] is the subgroup of all affine transformations preserving the scalar product, the orbit  𝔼[n] .fro consists of all orthonormal frames, and the Euclidean group acts simply transitively on this orbit. ■

References

Hermann Weyl. Space.Time.Matter. First published 1922. 
E-Book. www.cosimobooks.com

[OSI] A.L.Onishchik, Sulanke, R.  Algebra und Geometrie, Einführung. VEB Deutscher Verlag der Wissenschaften,Berlin 1977. (2. Aufl.Berlin 1986, Russ. Moscow 2004)

[OS3] A. L. Onishchik, R. Sulanke. Projective and Cayley-Klein Geometries. Springer-Verlag. Berlin,Heidelberg. 2006.