You are on page 1of 12

Graph Spaces

Jan Koenderink

D E C LOOTCRANS P RESS
Graph Spaces
Jan Koenderink

D E C LOOTCRANS P RESS , MMXII


Front cover: William Playfair (1759–1823). The Commercial and Political Atlas: Foreword
Representing, by Means of Stained Copper-Plate Charts, the Progress of the Com-
merce, Revenues, Expenditure and Debts of England during the Whole of the Eigh-
teenth Century, (1786). This short E–Book is intended as preliminary reading material for a sum-
mer course in visual perception. It is one of a series of short introductions.
The book was prepared in PDF–LATEX, using the movie15 and hyperref
packages. In order to make use of its structure use the (free!) Adobe Reader.
Make sure that all options are enabled! Video and sound clips will start by
clicking (or double clicking) the image, they are embedded in the file.
Make sure you are online. Clicking the light blue text will get you to Inter-
net sites with additional material (try this page!). Be sure to read some of that,
if good material is available elsewhere I’ll skip it in the text. Most references
occur only once, saving both you and me time. However, it means that you
may have to backtrack at times.
All links were active when I checked last. I will check them again with the
next reprint.

De Clootcrans Press Utrecht, february 12, 2012 — Jan Koenderink


Utrecht The Netherlands
jan.koenderink@telfort.nl

Copyright © 2012 by Jan Koenderink


All rights reserved. Please do not redistribute this file in any form without my
express permission. Thank you!
Jan Koenderink
Katholieke Universiteit Leuven
pax / jan koenderink Laboratory of Experimental Psychology
Tiensestraat 102 – bus 3711
3000 Leuven
Belgium
First edition, 2012 jan.koenderink@ppw.kuleuven.be
Personal page
10 9 8 7 6 5 4 3 2 1

i
length. Then the “coordinate” of a point can be treated as a real number, a
WHAT IS A GRAPH? member of R1 . The fact that we’re really dealing with the Euclidean line is
important though. It means that the origin is arbitrary, but that the unit length
is a physical entity (a “yard stick”). Moreover, the translation group is well
Apparently William Playfair (1759–1823), a Scottish engineer, in-
defined through the movement of the yardstick over its own length.
vented the line graph (or chart). Look at his graph on the cover,
especially the legend at the bottom:

The Bottom line is divided into Years, the Right hand line into 1.0 The blue curve is the graph of the
£10, 000 each. function y(x) = sin πx. At each
value of x (x = 0.25 in the example)
This is what graphs1 are all about! The two axes (dimensions!) are 0.5
there is a well defined value of y(x)
incommensurable. There is no way to relate ten years to so many
(the white point). The red curve
pounds sterling. Thus although the graph certainly looks like the 0.0

y
was obtained by a Euclidean rota-
Euclidean plane, it is in a completely different ball park. Does it
tion of the blue curve. It is not the
look like the Bottom and Right axes are at right angles? Have your
-0.5 graph of a function. For instance,
eyes examined! The angle is indeterminate. The plane of Playfair’s
the line x = 0.25 meets the curve in
graph is fully unlike the familiar Euclidean plane.
two (yellow) points. Euclidean rota-
This is the generic situation, encountered over and over again. Yet -1.0
-1.0 -0.5 0.0 0.5 1.0 tions don’t apply to graph space.
the obvious errors are also repeated over and over again. Most peo- x
ple appear to have no clue. This frequently leads to embarrassing
situations, even in the sciences.
In this chapter we introduce the geometry of graph spaces. In order for the example to be interesting, I take the ordinate to be a very
different space. I will use the affine line A1 . This is a common enough case.
On the affine line the only relation that is well defined is the bisection of point
Graphs on the real line pairs. Thus there is no “unit length” on the affine line. An implementation
would be the logarithm of the intensity (measured in some conventional unit),
then the graph would be a one-dimensional “image”, say the image due to
In one of the simplest cases the “Bottom line” (abscissa2 ) is the real number a linear CCD sensor. Then the abscissa would describe the geometry of the
line R1 . The “Right (vertical) line” (nowadays usually plotted at left) is known sensor, the ordinate the current intensity (modulo an arbitrary factor). In prac-
as the ordinate. More precisely the abscissa is not just the real line, but the tice we would often use the real line again, referring to some arbitrary origin
parameter space of a scalar, or indexical quantity. In our simplest example we and unit. In this example the “graph space” would be E1 × A1 . One might
use the Euclidean line E1 , equipped with some conventional origin and unit be seduced to change this to R1 × R1 , or even R2 , or — here we’re getting
1
“Graph” has various meanings. The cover picture defines mine, not this. to extremes! — E2 . Of course, you understand that to be ludicrous. The fact
2
The term “abscissa” is apparently due to Stefano degli Angeli (in 1659), a mathematics remains that people commit this silly error over and over again. Here I stick
professor in Rome. Then Leibniz used the term in his work. to E1 × A1 , which is evidently very different from E2 , the Euclidean plane.

1
Here is an example of the type of problems you meet when you commit the is attractive. The parabolic measures are in many respects “most pleasant”
error of identifying E1 ×A1 with E2 . You would be fooled to consider periodic since they don’t involve arbitrary units, like the radius of the elliptic geome-
rotations about a point. But consider what happens after a π/2 rotation: you try. In the dual plane both distances and angles are represented by points of
would have swapped the abscissa with the ordinate! But this is impossible. the full real line.
In Playfair’s example you would equate so many years with so many pounds A very convenient way to work with the “dual numbers” is to represent
Sterling. It makes no sense. Thus Euclidean rotations are not possible in the them through 2 × 2 matrices. Thus one writes
graph space. The graph space is a non-Euclidean space! However, it is not 
x y
 
u v

like any of the familiar “non–Euclidean spaces” (constant curvature homoge- z = x + εy = , and w = u + ε v = .
0 x 0 u
neous, isotropic spaces), like Lobachevky’s hyperbolical space, or Riemann’s
spherical space. Now notice that
     
x y u v x+u y+v
T HE SIMPLEST EXAMPLE is so useful because it happens to coincide with z+w = + = ,
0 x 0 u 0 x+u
a well known space, namely the dual number plane. The dual number plane
and
is much like the complex plane, except for the difference in “imaginary unit”. 
x y

u v
 
xu xv + yu

The imaginary unit of the complex plane is i such that i2 = −1, whereas the zw = = .
0 x 0 u 0 xu
imaginary unit of the dual plane is ε such that ε2 = 0. The “dual numbers”
This is most convenient! Moreover, it helps sensitive people to save face. One
are like z = x + ε y, where x, y ∈ R. Addition is defined through z + w =
needs not refer to any incomprehensible dual imaginary unit ε if one objects
(x+u)+ε (y +v), where z = x+ε y, and w = u+ε v, whereas multiplication
to it. If anyone objects. you merely parade the matrix model. All is under
is defined as zw = xu + ε (xv + yu).
control.
The dual plane is such a good model of graph space because the abscissa
The “number” ε is indeed objectionable, because ε 6= 0 (by definition), but
and the ordinate don’t mix additively. Thus x + u and y + v both makes sense
neither ε > 0, nor ε < 0 (easy to prove, do it!). Apparently the use of dual
(apples plus apples and oranges plus oranges), and so do xu, yv, xv and yu
numbers forces you to drop the Law of the Excluded Middle, that is to say,
(apples squared, oranges squared, or apples times oranges3 ). But anything
one has to adopt intuitionistic logic. From an intuitive point of view, ε is an
like x + v or y + u would be incomprehensible (apples and oranges).
infinitesimal, one calls them “nil square infinitesimals”. Any small number
The dual number plane has a very simple geometrical structure. It is one of get REALLY SMALL on squaring, for instance 0.01 squared is only 0.0001,
the nine two-dimensional Cayley-Klein spaces. It is particularly nice, because something you might easily forget about. The problems arise mostly from the
the distance and angle measures are similar (both parabolic). The Euclidean confusion of ε with a real number. No way you can make that stick!
plane is different in that the distance measure is parabolic, whereas the angle Perhaps the most useful property of the dual numbers has to do with the
measure is elliptic. This is the reason for the many unpleasant “exceptions” analytic functions. If F is differentiable, then
mentioned in Euclidean theorems. The familiar spherical geometry (both dis-
tance and angle measures elliptic), which you probably know, is also much F (z) = F (x + ε y) = F (x) + ε yF 0 (x),
simpler (because more symmetric) than Euclidean geometry. The symmetry where F 0 (x) is some real number. Moreover, this is the full Taylor expansion
3
of the function F ! Functions are locally affine maps. Important examples are
This is the important topic of dimensional analysis, also called Factor-Label Method or
the Unit Factor Method. sin ε x = ε x, cos ε x = 1, and exp ε x = 1 + ε x.

2
Notice that in pounds Sterling at each of its points. These spaces are mutually unrelated
z = 1 + ε x = exp ε x, (parallel). They are most conveniently labeled by date.
The isotropic lines subtend an infinite angle with any graph. One might
the modulus |z| = 1, whereas the dual part x is the argument. The “polar
say that they are “normal” to any graph. This is perhaps worrisome, because
form” is trivially similar to the Cartesian form!
the isotropic lines are mutually parallel (have no points in common): but if
In general one writes
all normals to a curve are mutually parallel, then how does one possibly do
y y differential geometry? We show how to below.
z = x + ε y = x(1 + ε ) = x exp ε = |z|eε arg z ,
x x Like a conventional complex number, the dual number z can be understood
as a dilation-rotation operation. Multiplication with the number z = x + ε y
Thus the “real part” of z is the modulus |z| of z (notice it is signed!),
implies a scaling by the real part (x), and a rotation over the argument (y/x).
whereas the “dual part” of z/|z| is the argument of z. Notice that arg z equals
This is in all respects similar to the case of the familiar “complex numbers”.
y/x. (Notice that in the familiar complex case one has arg z = arctan y/x,
but here arctan y/x = y/x!) This motivates the definition of the “dual angle”.
The distance measure is defined as
1.5 The blue curve is the graph of
dzw = |w| − |z|, the function y(x) = sin πx. The
1.0
red curve is a (dual plane) ro-
whereas the angle measure is defined 0.5 tation of the blue curve, that is
y(x) = x + sin πx. Notice that the
∠ zw = arg w − arg z. 0.0

y
orange points are transformed into
-0.5 each other by rotations, they move
Both the distances and the angle range over the full real line. Thus both the along the dotted line. This prevent
distance (as in the Euclidean line) and the angle are parabolic, that is to say, -1.0
the curve from “turning over”, in
not periodic. other words, the rotation is not pe-
-1.5
Two numbers p = a + ε b and q = a + ε c for b 6= c have zero distance, -1.0 -0.5 0.0 0.5 1.0 riodic.
yet they are obviously different! One naturally calls such points p, q mutually x
“parallel”. In order to be able to distinguish the points one likes to redefine
“distance”. Let the distance defined above be called the “proper distance”. More specifically, the group of similarities that leaves the abscissa invariant
Then I define a “special distance” in case the proper distance vanishes. For is given by
such points as p, q the “special distance” is defined as δpq = c − b. The
special distance is not applicable to points with non-zero “proper distance”, x0 = x
like above. All points parallel to a given point p = a + ε b lie on the line y 0 = %x + σy + τ,
p = a + ε s, with s ∈ (−∞, +∞). All points on such a line have zero
proper distance to each other. Such lines are called “isotropic” (or “null– where % denotes the angle of rotation, σ the factor of dilation, and τ a trans-
line”). Graph space is foliated by a family of mutually parallel isotropic lines. lation. Since the ordinate is the affine line, the translation τ is generally ir-
In Playfair’s graph the abscissa (date space) carries a copy of the space of relevant. The dilation is a dilation of angles. A dilation of distances would

3
be x0 = ax, where a is the factor. Similarities a 6= 1, σ = 1 are “similarities speed f 00 (s). Thus the curvature of the curve is simply f 00 (s), much simpler
of the first kind”, whereas Similarities σ 6= 1, a = 1 are “similarities of the than in the Euclidean case, where we have a non-linear mixture of first and
second kind”. General similarities would be mixed. For σ = 1 we obtain the second derivatives. Thus the differential geometry of graphs is remarkably
group of “proper motions” or congruences, that conserve both the proper and simple.
the special distances. Notice that the rotation conserves distances and angular Notice that the tangent line to the curve at s = s0 is
differences, as should be.
Any once differentiable real function F (x) is analytic. It induces a confor- z(s0 ) + (s − s0 )z 0 (s0 ) = (s0 + εf (s0 )) + (s − s0 ) (1 + εf 0 (s0 )) ,
mal transformation of the dual plane. Thus the algebraic structure of the dual
plane is everybit as nice as that of the conventional complex number plane. that is (with ∆s = s − s0 )

T HE GEOMETRY OF GRAPH SPACE is also very attractive. It is not less s0 + ∆s + ε (f (s0 ) + ∆sf 0 (s0 )) ,
“rich” than the geometry of the Euclidean plane, but much more symmetric,
without the unpleasant exceptions. A great introduction to the geometry of whereas the osculating circle is
the dual number plane are the (easy and fun to read) books by Isaak Yaglom4 .  
What is especially of interest here is the differential geometry of curves. 0 1 2 00
s0 + ∆s + ε f (s0 ) + ∆sf (s0 ) + ∆s f (s0 ) .
(The “graph”!) Suppose we have a graph z(s) = s + ε f (s), with s ∈ R. A 2
“graph” is thus a curve that meets each isotropic line only once. For instance,
This osculating circle is a “circle of the second kind”, that is a curve with con-
something like √ stant curvature. It looks like a parabola to the “Euclidean eye”. The “circles of
z(u) = u ± ε 1 − u2 , (u2 < 1)
the first kind”, centered at c and with radius r > 0, are loci |x−c|2 = r2 . Thus
a locus that “looks like a Euclidean circle” is not a graph. Is is composed of they look like two parallel (isotropic) lines, and are loci of constant distance
two distinct branches, one for either sign. These branches are not connected from the center.
to each other. The points z = ±1 are to be excluded, we really require finite
slope. A moving frame traversing the blue
Notice that the curve z(s) = s + εf (s) is parameterized by arc length s, curve. The red vector is the tangent,
because |z(s1 ) − z(s2 )| = s1 − s2 . The tangent vector t(s) is t(s) = z 0 (s) = the black arrow is the unit vector in the
1 + ε f 0 (s) = exp ε f 0 (s). From the form of the expression we see that this isotropic direction (also the curve nor-
is a unit tangent. The rate of change of the tangent is t0 (s) = ε f 00 (s). Thus mal), the orange vector the unit vec-
the tangent turns over an angle f 00 (s) towards the normal (remember that all tor in the spatial direction. The rate of
normals to the curve are simply ε (the isotropic lines). Indeed, the tangent and change of the dashed line segment is
normal “moving frame” connected to the curve rotates rigidly with angular the curvature.(Video clip.)

4
Yaglom, Isaak M. (c1979). A simple non-Euclidean geometry and its physical basis:
an elementary account of Galilean geometry and the Galilean principle of relativity. Abe
A common operation in graph spaces is to “subtract the linear trend”. No-
Shenitzer (trans.). New York: Springer-Verlag. ISBN 0387903321. (translated from Russian) tice that this can be done via a rotation. It is always possible to find a rotation
and Yaglom, Isaak M. (1968) Complex Numbers in Geometry. such that the tangent line at a given point will have zero slope. Adding a

4
translation one may also remove the offset. Thus “detrending” in graph space An “image” is a cross section {x, y, z(x, y)}. Thus the tangent plane is
involves only congruences. spanned by the vectors {1, 0, zx (x, y)} and {0, 1, zy (x, y)}. These are unit
Thus we have obtained a fairly complete initial overview of the (perhaps) vectors, since the fibers are taken to be isotropic lines. The normals to the
simplest case of a graph space. sections are the isotropic lines, thus the standard Euclidean differential geom-
etry via the Gaussian normal image will not work here.
Consider the “gradient space” defined as {zx (x, y), zy (x, y)}. Gradient
General graph spaces space does everything that the Gaussian normal image does! It has folds and
cusps where the Gaussian normal image has it. Planes map on points. The
unit sphere (of the second kind) {x, y, (x2 + y 2 )/2}, maps on {x, y}, thus is
In general we consider graph spaces as fiber bundles. There is a base space the identity map! Using the gradient space instead of the Gaussian normal
(analog to the abscissa in the simple case), each point of the base space car- image, we may proceed to do differential geometry of surfaces!
rying a fiber, which is a copy of another space (analog of the ordinate in the The similarities (proper motions for σ = 1), given by
simple case). A “graph” then is a cross section of the bundle.
In most applications the base space will be a surface in Euclidean E3 , for in- x0 = x
stance a plane (like in image processing) or a sphere (as in keyhole viewing). y0 = y
The fibers would be affine lines (log intensity), circles (the color circle), three z 0 = %x x + %y y + σz + τ,
dimensional affine positive cones (color space), and so forth. Here we con-
centrate on the common case of the affine line. A cross section then assigns have very simple effects on the gradient image. The rotations {%x , %y } trans-
a value to each point of the base space. This scalar field is conveniently visu- late the gradient image5 , the translation τ does nothing, whereas the dilation σ
alized through its isophote pattern. It is a very common structure. Like in the imposes a uniform magnification. Thus the gradient space is indeed the spit-
simple case, the geometry involved is non-Euclidean, involving an isotropic ting image of the Gaussian sphere.
dimension. Although one frequently finds Euclidean methods applied to such The Jacobean matrix of the gradient map is
space, this is to be considered nonsensical. People apparently do this because  
this yields results (even though the results are inconsistent and essentially zxx (x, y) zxy (x, y)
JG = ,
meaningless). zyx (x, y) zyy (x, y)
I’ll look at a simple, very common case first, then I’ll consider some useful
extensions. thus is simply the Hessian of z(x, y), that is (again)
 
I N IMAGE PROCESSING one conventionally considers the base space to be zxx (x, y) zxy (x, y)
Hz = .
the Euclidean plane E2 . We use a standard Cartesian coordinate frame with zyx (x, y) zyy (x, y)
coordinates denoted {x, y}. The fibers represent “intensity”, a non-negative 2
quantity I(x, y) (say). The are good physical reasons to use log-intensity in- The area magnification is det Hz = K = zxx zyy − zxy , in analogy with the
stead, thus z(x, y) = log I(x, y)/I0 , where I0 is some unit, usually (in image area magnification of theGaussian normal image we may denote it to be the
processing) arbitrary. For the moment I consider all fibers to be calibrated 5
Very much like the rotations in Euclidean geometry, which rotate (which is much like a
identically. “spherical translation”) the spherical image.

5
“Gaussian curvature”. Likewise, one half of the trace may be denoted the A similar thing often occurs in image processing, especially in the type
“mean curvature 2H = zxx + zyy . The “principal curvatures are the eigen- of processing done by photographers in order to make their product look as
values of the Hessian matrix, and the “directions of principal curvature” are good as possible. Many techniques still date from the darkroom age. Similar
given by the eigenvectors of the Hessian. transformations were commonly implemented on old fashioned monochrome
What we have obtained is essentially an analogon of the Euclidean differ- television sets.
ential geometry of surface. Only the formal expressions are way more simple. Many of these transformations affect the image globally. Examples include
This is mainly because the spatial attitude of the tangent plane is of no rele- the overall level (“brightness” knob on the TV monitor, printing exposure in
vance to the curvature. In the Euclidean case you may rotate to tangent plane the darkroom). It can be implemented through a translation in the isotropic
coordinates to make life simple. In the graph space this is not necessary, direction. The “contrast” adjustment is equally common (the “contrast” knob
things are simple as they are. on the TV monitor, in the darkroom development time or change of paper
grade). It can be implemented through a similarity of the second kind. More
W HAT IF THE BASE SPACE IS CURVED ? In that case we depart from the sophisticated are “grad-filters” as used in photography. The effect of a grad
intrinsic geometry of the base space. filter is obtained in the darkroom through a spatial gradient of printing time.
Consider an arbitrary point of the base space, and construct all geodesics This transformation corresponds to rotations in graph space. These transfor-
that pass through it. In a sufficiently restricted environment this yields some- mations are similarities of grad space, they are considered “honest photogra-
thing like a (curvilinear) line bundle. Along each geodesic we apply the ge- phy”, that is to say, they don’t “change” the image, only make it “look better”
ometry of the simple example. This allows us to compute the slope and the through some kind of normalization.
curvature of the surface along the geodesic. Repeating this for all geodesics
These transformations can be implemented through a calibration of the
through the point we obtain the curvature landscape at that point. What we
fibers that depends on their location in the base space. A geometrical way to
have constructed is the exponential map. We have the sectional curvature for
do this is to define a pair of parallel planes, a “zero-plane” and a “unit-plane”.
every direction from the fiducial point.
The zero plane is used as a cross section that defines the origins of the fibers,
the unit plane to define the unit length (the separation of the planes). This
yields exactly the freedom required to implement the “honest photography”
manipulations.
Gauge fields
The pair of planes may be called a “gauge”, imposing a gauge field to
calibrate the fibers. “The” image is what is left invariant under changes of
In many cases one cannot rely on a common calibration of all fibers. More- gauge. These are the invariants under the group of similarities of graph space.
over, one has frequent occasion to change the calibration from point to point. Much more complicated gauges are feasible. Instead of a pair of parallel
This is especially common in the case of biological systems. These tend to plane one may use a family of mutually parallel, arbitrarily curved suraces
rely on local mechanisms that “adapt” (change their gains and set points) in- for instance. This yields what might be called “lasagna” gauges. They were
dividually, and — even worse — don’t convey this local calibration to other commonly used in the darkroom through selective “burning” and “dodging”.
locations. What results is an engineer’s nightmare. Yet biological systems Such appear the kind of gauges common in biological sensor arrays.
do okay on the whole. From a formal perspective, this is the issue of gauge Even more complicated gauges are feasible. It is only strictly necessary to
transformations. have the gauges defined locally, perhaps only partially “meshing” globally.

6
Such general gauge fields complicate the differential geometrical structure of OTHER E B OOKS FROM T HE C LOOTCRANS P RESS :
the graph space. In general the space acquires both a torsion and a curvature.
1. Awareness (2012)
2. MultipleWorlds (2012)
3. ChronoGeometry (2012)
4. Graph Spaces (2012)
5. Pictorial Shape (2012)
6. Shadows of Shape (2012)
(Available for download here.)

A BOUT T HE C LOOTCRANS P RESS

The Clootcrans Press is a selfpublishing initiative of Jan Koenderink. No-


tice that the publisher takes no responsibility for the contents, except that he
gave it an honest try—as he always does. Since the books are free you should
have no reason to complain.

T HE “C LOOTCRANS ” appears on the front page of Simon Stevin’s


(Brugge, 1548–1620, Den Haag) De Beghinselen der Weeghconst, published
1586 at Christoffel Plantijn’s Press at Leyden in one volume with De Weegh-
daet, De Beghinselen des Waterwichts, and a Anhang. In 1605 there appeared
a suplement Byvough der Weeghconst in the Wisconstige Gedachtenissen. The
text reads “Wonder en is gheen wonder”. The figure gives an intuitive “eye
measure” proof of the parallelogram of forces. The key argument is

de cloten sullen uyt haer selven een eeuwich roersel maken, t’welck
valsch is.

Simon Stevin was a Dutch genius, not only a mathematician, but also an
engineer with remarkable horse sense. I consider his “clootcrans bewijs” one
of the jewels of sixteenth century science. It is “natural philosophy” at its
best.

7
8
9

You might also like