7
$\begingroup$

I'm a programmer and I've recently come back to math hoping to sharpen some of my skills. I did well in math in high school. I also did math competitively. I majored in music in college, so I stopped doing math pretty much after high school.

Lately, I've been distracted by geometry and have been thinking of spending some time getting seriously acquainted with the subject, starting with Euclid and working out from there. My exposure to geometry has been pretty much the standard middle/high school fare. Not very exciting...

Recently though, I've been fascinated by the subject. Is there any good reason for a programmer to study geometry? There are other branches of mathematics that would be more immediately applicable in my life.

Also, would studying geometry help develop proof writing skills? (something I desperately need)

I've also read that studying geometry can help sharpen "mathematical intuition," whatever that is. Is that true?

$\endgroup$
  • 5
    $\begingroup$ If you'll be dealing with computer graphics, you definitely need to study geometry. $\endgroup$ – J. M. is a poor mathematician Oct 20 '11 at 0:29
  • 2
    $\begingroup$ Computational geometry is used in computer graphics, video games, and computer aided design. $\endgroup$ – user2468 Oct 20 '11 at 0:43
  • 1
    $\begingroup$ Not that it helps directly with proof writing, playing with a modern 'proof assistant' like coq can be quite enlightening (at least it was for me). It will certainly show you all of the places that you are making leaps without justification. Working through something like this might be entertaining, though pretty much orthogonal to geometry. $\endgroup$ – deinst Oct 20 '11 at 2:53
  • $\begingroup$ Neat! I'm actually pretty good at functional programming, though my proof skills remain weak. This might be an interesting way to fix that. $\endgroup$ – Josh Infiesto Oct 20 '11 at 19:04
12
$\begingroup$

Geometry is useful for statistics/optimization: Think of stuff like linear/convex programming (or nonlinear programming). Those are very geometrical algorithms. This gets used in computer vision - for example for bundle adjustment. I know (for example linear programming) also gets used a lot in economics.

The other application would be computer graphics i think. One example that comes to mind is mesh enveloping - this is used a lot on current games/3d programs.

I don't think this is great for learning the ins and outs of proofs. Maybe algebra (or topology and so on) is better for that. Sure you can axiomatize geometry and that is a big accomplishment (Euclid, Hilbert), and especially projective geometry is very axiomatizable. But i think most people are drawn to geometry because it is so intuitive. Geometrical constructions are really intuitive by them self - and they are already the expression of a proof.

That is why there is such a gap between geometry and logic...

$\endgroup$
3
$\begingroup$

Why study geometry?

  • Because it's gorgeous. See C. Stanley Ogilvy's Excursions in Geometry.
  • Because it has applications to computer graphics. You might look at some of the recent books on applications of quaternions to computer graphics. Not to mention other aspects of computer graphics.
  • More "theoretical" applications. In statistics: suppose you know $X_1,\ldots,X_n\sim N(\mu,\sigma^2)$. How do you know that the sample mean is probabilistically independent of the sample variance, and how do you know that the latter has (modulo a factor) a chi-square distribution with $n-1$ degrees of freedom? Just think about complementary orthogonal projections! Same thing with lots of regression and ANOVA problems, and design of experiments, and stuff about the Wishart distribution, etc.
  • DO NOT assume the list above is exhaustive.
$\endgroup$
2
$\begingroup$

Unless you're working in certain specific areas of programming you won't find geometry directly applicable. In fact I would disagree with the answers that geometry is a prerequisite for computer graphics: you can write a 3D engine knowing only linear algebra.

On the other hand there are some areas which are becoming more popular where a good understanding of geometry is essential. The most obvious one is GIS (so don't limit yourself to Euclidean geometry). The number of people who think you can find the half-way point between two points on the globe by averaging their latitudes and longitudes is quite astounding.

$\endgroup$
  • 2
    $\begingroup$ "you can write a 3D engine knowing only linear algebra" - writing such an engine without being able to visualize what those matrices actually do sounds... Herculean. $\endgroup$ – J. M. is a poor mathematician Oct 20 '11 at 9:25
  • $\begingroup$ @J.M., how much geometry do you need to know? You need to know what an angle is, and what sin and cosine do. That's stuff they teach 13 year-olds. Anything else? $\endgroup$ – Peter Taylor Oct 20 '11 at 9:37
  • $\begingroup$ You said "only linear algebra"; that's what made the task sound difficult to me. I somehow didn't get the impression that the OP wanted a nuts-and-bolts look at geometry, but just refreshing himself with the basics... $\endgroup$ – J. M. is a poor mathematician Oct 20 '11 at 9:43
  • 2
    $\begingroup$ -1 I am a researcher in computer graphics. If you want to be a code monkey in the tools group, you may be able to get by with only linear algebra. If you want to do any kind of research, however, including industry R&D, and especially if you are interested in simulation or geometry processing, I would strongly recommend taking at least a year of Riemannian geometry. See the proceedings of the various conferences (such as SGP: diglib.eg.org/EG/DL/WS/SGP) for a sense of the math involved in the field. $\endgroup$ – user7530 Oct 23 '11 at 14:13
  • $\begingroup$ @user7530, I'm not saying that geometry has no application at the cutting edge of graphics research - although even there it's not necessarily a prerequisite: I've read papers from ProcSigGraph which require linear algebra but no geometry. But let's keep things in perspective: the context here is being a programmer, not doctoral (or post-doc) study. $\endgroup$ – Peter Taylor Oct 23 '11 at 15:35
0
$\begingroup$

Philosophical Connections

Let me throw my humble opinion. In computer programming, we are in the business of devising abstractions to solve the problems of the domain. Besides programming, you have computer science that builds, let's say, theoretical abstractions. Geometry is also about building abstractions to solve problems of space-time and similarly you have mathematics that builds theoretical abstractions. The use of abstraction in these related fields differ though.

Let me give an example. Suppose you have a problem, you want to find best first order approximation to a function. You simply start in terms of your observations and direct models. This leads you to tangent lines and approximation by tangent lines and to a simple version of Taylor's theorem. You can now devise an approximate solution to your problem at hand. There is a bigger opportunity lurking around here though. With your new geometric insight, you can now come up with more general abstractions, theoretical abstractions I called these. Trying harder to organize your thoughts, you come up with Taylor's theorem in full generalization and along the way you refine your approximation method to come up with a better strategy: Newton's method for finding numeric roots. So you started with the problem at hand, geometric insight led to ideas of further general abstractions, you devised more powerful abstractions and you went back and refactored your initial solution with the language of your new abstractions. In the end, you solved your problems and devised mathematical analysis techniques to increase your confidence in your theories.

This ties naturally with the relationship between programming and computer science, I guess. Think about how we ended up with all the tools of computer science. Suppose you are writing a program that responds to changing sensor outputs for different types of sensors. You solve your problem using the algorithmic insights you have but with the help of your algorithmic insight, you then devise new abstractions. Let's say you came up with message-passing style of communicating processes along the way. You devise the language of this new kind of abstraction and go back to refine your initial solution in terms of this language.

So, here is how I can summarize things. Both mathematics and computer science are iterative processes of elevating a language towards richer and richer abstractions. One is a declarative language and the other is an imperative language, one is about "what is" and the other is about "how". This part is explained in Structure and Interpretation of Computer Programs by Abelson and Sussman. Of course, we refine our languages through talking and using them on daily basis, just like how natural languages evolved through centuries. Talking mathematics is called geometry, talking computer science is programming. In a sense, geometry is what is known as applied mathematics and programming is what is known as applied computer science. I believe, all these things are tied together in constructive mathematics.

Let's stretch this analogy further to philosophize needlessly, to the point that it becomes absurd. Geometry and mathematics as explained above is what we call physics. Computer science and programming as explained above is what we call metaphysics.

But aside from this useless philosophical things, I think getting into the mindset of a geometer thus is helpful to a programmer. Couple of suggested books would be:

  • Numbers and Geometry, John Stillwell
  • Calculus, by Spivak
  • Theodore Shifrin's lectures on Youtube, on multivariable calculus
  • Introudction to Tensor Analysis and Calculus of Moving Surfaces, by Pavel Grinfeld
  • Elements of Programming, by Alexander Stepanov
  • Space, Time and Stuff, by Frank Arntzenius for further philosophy
  • The Road to Reality, by Roger Penrose maybe if you had the time

Direct Connections

There is a field called computational geometry. You can think of this as Euclid's ruler and compass constructions on steroids. The techniques devised here are used in polygon processing, computer graphics, machine learning and clustering through proximity analysis etc. I think computational geometry is a splendid subject to apply and strengthen your algorithms and data structures knowledge. With a little bit software rendering, you can easily visualize your results which might be a bonus if you like to concretely see the results of your computations.

Vectors used to do geometry and maps between vector spaces are used immensely in computer graphics. Numerical and other optimization problems are often geometric in nature.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.