tags:

views:

4505

answers:

44

What's the highest-level math you've used in the real world? What did you need it for? Where did you learn it (in school, by yourself)? (Incidentally, I do mean in a programming context, as this is a programming website.)

Note: I'm not wondering if mathematics is necessary for programming or the relationship between math and programming, and I'm not trying to figure out how much math to learn myself. Those are all good questions, but I was just wondering what the highest-level math you personally used in the real world. (You can decide what "highest-level" means for you personally as well.)

Perhaps it was for a domain-specific application. So your answer might be:

  • Computing projections and intersections in computer graphics
  • Quaternions because you work with 3-d rotations
  • Runge-Kutta or the finite element method for some differential equations
  • Fourier transform for some signal processing
  • Nothing beyond bit operations
  • "None at all"

I don't know! But I'm interested.

+1  A: 

I've used linear algebra to solve problems related to computer graphics. I learned this during college.

I've also used calculus II, because I had to use a Taylor expansion for a simulation problem on which I was working. Don't know if that really counts though, because that's a pretty basic and common use of calculus. Learned that during college, too.

mipadi
+3  A: 

Working in the financial industry, I use a lot of math related to money. Tax calculations, gain/loss, performance of portfolios. I learned most of this in college. The basic math skills came from high school, but applying it to finance was probably college.

I think it is relative to what you are programming. If you're programming accounting software, you are going to need to know all the credit, debit, depreciation math, et.al.

Dustin Brooks
I took some finance theory in college and worked at a financial firm myself. I was wondering, did you ever learn any portfolio theory (efficient frontier, Markowitz stuff), and if so, did you apply it? I learned it but never used it ...
A. Rex
From the point of view of a mathematician, what you're talking about hardly qualifies as math, but rather arithmetic. Unless you're building up a number system axiomatically, mathematicians are not interested in arithmetic per se.
David Thornley
statistics are huge for accounting systems
Tom Anderson
+4  A: 

Differential equations, for moving part speeds in a number of multi-lever mechanical arrangements in my hobby electromechanical projects.

Sparr
+1  A: 

I've recently had to use Simpson's method for numerical integration for an app. I had to break out my numerical analysis book from college...

Austin Salonen
+6  A: 

I've used a decent amount of graph theory for figuring out interactions in biological systems.

dsimcha
Graph theory is very important when you get into tracing paths through complex geometry as well. Sometimes a topological solution is faster / more accurate than a geometrical solution.
Chris Cameron
+2  A: 

Linear equations for a graphics project. ["Real world" being a flexible concept]

Also used some when trying to figure out how much kids tickets cost. [My cousin booked all the seats and I knew how much the Seniors and Adults cost. He gave us the total amount, but couldnt remember how much the Kids tickets cost... to complicate things, we had bought tickets in 2 batches...]

Calculating compound interest.

Oh almost forgot... I used to work for an investment advice firm a few years ago, and used a LOT of compounding and tax rates and all those things.

Mostlyharmless
+4  A: 

Being in research...

Linear Algebra (eigenvalues, matrix operations)
Combinatorics
Vector Calculus
Graph Theory
Maximum Likelihood and Bayesian analysis
...

nlucaroni
+1  A: 

In my nearly-entirely database and business world (the word 'enterprise' makes me wince) career, I think the most advanced math I've used has been statistics: probability and occasionally some basic combinatorics.

I have happened across something that required me to break out my old calculus textbook, I'd be delighted :D

(Maybe I should start calling the SQL queries I write "Applied Set Theory"!)

Dana
+5  A: 

Almost anything:

  • probability theory
  • integration and differentiation
  • linear algebra
  • algebra
  • vector/point calculations
  • And more (but I don't know the correct English words for them).

Ok, I like to work at math intensive applications ;-).

Gamecat
+2  A: 

I've used a fair bit off differential and integral Calculus outside of work and school (but I'm also a huge nerd and love to apply these things to anything I can).

And yes, at work, Calculus II and Linear Algebra material often come up. But for your own daily life, Calculus I puts you far ahead of the curve. AND you'll be able to derive how your place on that curve is changing relative to time! How cool is that?

bigwoody
+21  A: 

Useful:

  • Matrices - Comes up a lot in social network analysis and graphics
  • Geometry - I've found lots of use of sin/cos in even basic graphic work
  • Differential Equations - Useful to know, although I've never coded a diffy-q.

Good to know, haven't really used:

  • Derivatives and Integrals - just good to know about rates over time

Never used:

  • Calculus - limits, triple integration (but I am not a Mechanical Engineer), fields (but I am not an Electrical Engineer)

Things I wish I learned:

  • Statistics - I come across statistics regularly when I read HCI material, and this would be good for general statistical literacy anyway
David
+1  A: 

I've ended up having to do a lot of statistics math professionally. Things like standard deviations, linear regressions, averages with error bars, that kind of thing. Basically, anything that turns a line graph into a more interesting line graph on data reports.

(Which is funny, since statistics was my worst subject in school, hands down.)

Electrons_Ahoy
+2  A: 

Robotics use matrices for kinematics and inverse kinematics as well as a lot of 3D geometry and vector calculations.

Jim C
+1  A: 

Never used it but needed it: calculus for the volume of fluid filling a cylinder on it side (think of a large oil tank lying on its side... measure the oil level in feet using a dip stick but need volume in gallons). Even more complicated if the tank is not lying perfectly flat.

+6  A: 

The highest-level was as an intern: queueing theory (for modelling performance of a packet network).

Beyond that, not much:

  • Big-O notation
  • Hexadecimal notation
  • Doing arithmetic with bitwise operations
  • Logic, especially "Proof by induction"
  • Elementary calculus (waveform analysis for signal processing)
ChrisW
Understanding proof by induction is a big help in being able to read and write recursive functions, which I think is common enough.
Chris Cameron
Yes, the things which I listed were the things which I considered to be both "not much" and "used in the real world".
ChrisW
+1  A: 

I have used geometry and graph theory for VLSI physical design. Statistics for information retrieval. Should my linear algebra be less shaky, I would sure find a use for it. Back-of-the-envelope calculations - extremely useful for programming any medium-sized or larger system.

Yuval F
+7  A: 

I've learned these fields (I realize some of these are broken down along rather arbitrary lines):

  • continuous time signal analysis
  • discrete time signal analysis (DSP)
  • differential equations
  • vector calculus (and of course regular calculus)
  • discrete math (logic, boolean algebra, set theory, etc)
  • geometry
  • algebra
  • linear algebra / matrix math
  • statistics/probability
  • trigonometry
  • control theory

In writing software, the only ones on the list I haven't used are continuous time signal analysis (because everything in a computer is discrete, unless you go to great lengths to simulate continuous), and vector calculus. I have used regular calculus. Most of the math usage comes in writing games, but I've also had to use quite a bit for business applications (particularly logic and statistics). I've also spent a lot of time writing embedded apps (my degree is in electrical and computer engineering), hence the use of control theory, though I bet that would be useful in some computer games as well.

rmeador
Indeed I have had to dip into control theory while writing a game, though we didn't need much past a simple PID controller.
Crashworks
+2  A: 

Algebra has solved most of my computing problems.

I have to stop and do some Boolean algebra on occasion.

Some of the engineering apps I worked on required some basic geometry.

And a lot of the stuff I learned in intro to logic applied to the SQL sets.

Mostly learned in college, some in high school.

darren
A: 

Begin a programmer by trade, many of these are obvious:

Algebra I

Geometry

Algebra II

Trigonometry

Statistics

Discrete Mathematics

I got "A"s in all those classes, so it makes sense that I would use them in my daily life.

Never used:

Calculus - Probably because I only got a "C". I really should have studied/tried harder.

History - What a waste! :D

BoltBait
Everything you're learning is history, it certainly didn't come from the future :)On a more serious note, it's important to review the mistakes others have made in order to avoid them yourself. The mistakes are what make us though, it's why nobody's perfect.
Sneakyness
+6  A: 

I used to do finite element analysis of non-linear problems in solid mechanics and heat transfer, so I've applied a great deal of the math I learned. I was a mechanical engineer, not a software developer, but we wrote a lot of code to supplement and customize the commercial packages that we used.

  1. Ordinary and partial differential equations, with all the attendant calculus.
  2. Numerical methods.
  3. Linear algebra.
  4. Tensor calculus for continuum mechanics of large deformation, large strain mechanics problems.
  5. Complex variables.
  6. Integral transforms (Laplace, Fourier, Hankel, etc.)

Now I do web apps for business - not as much math as my previous career. Statistics and discrete math are the most useful now.

duffymo
That's awesome. I'm glad to hear that many of the things I hear about often in applied math departments in the ivory towers -- finite element, all these transforms, tensor calculus -- is being used. =)
A. Rex
+2  A: 

Statistics

As a data warehouse developer, I get giddy when people want to do more than just average some numbers. I try to explain that while average is a valuable piece of information it doesn't even begin to profile your data set.

When I begin to show them Medians and Stdev and histograms, they back away slowly.

TrickyNixon
You cant stop with medians and Stdev, they're the *least* interesting parts!
Kent Fredric
A: 

At my job.

  • Discrete (I use it a lot).
  • Statistics
  • Calculus
  • Algebra
  • Geometry
J.J.
+1  A: 

I've done more database and GUI stuff, and honestly, I think basic algebra and a bit of statistics has been all I needed. I've forgotten most of the calculus, differential equations, and the rest. I got a minor in math and haven't used it at all.

thursdaysgeek
+3  A: 

Past a certain point, math doesn't really come in ladders -- rather than lower and higher levels, it kind of branches out profusely, and you learn what you need, or what you're interested in...

Graphics programming is my main thing, and I've used a lot of calculus and linear algebra for it, as well as for other purposes, plus the projective geometry which really constitutes "3-D math".

I've used Fourier transforms for evaluating filter designs and stuff (although strangely enough I haven't needed to actually use an FFT yet), and probability and statistics for data compression as well as Monte Carlo methods.

I learned most of this math in college. But, when using math for a particular purpose, at the very minimum you're likely to pick up bits and pieces of math you didn't have before; and sometimes, you end up exploring some field you hadn't even heard of.

comingstorm
Cool. w.r.t. Fourier transforms: do you just do a "slow" O(n^2) transform? Is there any disadvantage to just swapping in an FFT?
A. Rex
Mostly, I just did the math, to see what I should expect from the filter. I've also done a "slow" O(N*S) transform from S randomly-placed samples to N frequency values (an FFT requires regular input samples, so I couldn't use it directly). Fortunately, performance in that case was not critical!
comingstorm
I actually wondered about how you could do a Fourier transform with irregularly-placed samples. I asked an expert in the area and he gave me some papers to read which, AFAIK, solved things *relatively* quickly. I never read the papers, and I never implemented what I needed. =(
A. Rex
+2  A: 

For work basically the most I have done is:

  1. Algebra for manipulating equations. Nothing too fancy, definitely high school level math. I am including logarithms and exponents under Algebra here.

  2. Discrete math, but at a very basic level. The logic, counting principles (product and sum rule), basic set theory, basic logic theory, etc. were all things I learned prior to college. So again high school level math.

    • One excepion to this is topological sorting. I did learn this in college and I used it once on an SQL query to order a list of dependencies so I could figure out which order to execute a set of rules for calculating columns in a query where each calculation was stored in a data table (in no particular order). But that was getting overly fancy. A normal person could have just ordered the rules himself/herself.

On my own time playing around: Trig/Vector Calculus/Geometry/Linear Algebra/Probability + Statistics

I was reading an information retrieval book and some of their methods involve Vector calculus and linear regressions for implementing search algorithms. I have also been reading on data mining and using some probability tools.

Cervo
+1  A: 

Algebra, Trig.

The fact that I have spent my entire career dealing with CAD/CAM systems probably has something to do with a lack of math needs.

Loren Pechtel
+12  A: 
Roberto Russo
What kind of mathematics is required to create a chip that allowed you to post this answer?
J.F. Sebastian
@J.F. Sebastian: The kind needed to the remaining 5% of "Real World Programming".
Roberto Russo
You really need at least algebra. That's what a lot of programming is.
Mr Fooz
A small subset of Elementary Algebra at most. Joe The Programmer never spotted Artinian rings in his daily enterprise CRUD crap.
Roberto Russo
Yeah, I meant high school algebra.
Mr Fooz
You would never be able to find O(n) with arithmetics only. And you should at least be aware of the approximate order in ALL your programs in the REAL world.
omgzor
I feel that my daily CRUD-crap needs more profound Computational Complexity Theory and P=NP conjecturing.
Roberto Russo
This may be right but isn't what the question asked.
Jason Orendorff
+1  A: 

Well, for an engineer who also writes code, I've used:

  • Partial Differential equations (mostly simplified tensor field equations)
  • matrices
  • Fourier transforms
  • Laplace transforms
  • multi-dimensional integrals
  • probability and statistics
  • geometry and trigonometry
  • vector calculus
  • numerical methods for root finding, integration, etc.

Started doing all this is FORTRAN in school. Nowadays simple stuff in Excel with VBA. More complex things get done in python.

Technical Bard
+2  A: 

Math I've used in programming, from "highest" to "lowest":

  • The "highest level" math I've used was graduate math in measure theory (real analysis), which I used in the design and implementation of a probabilistic language that would handle both continuous and discrete probability.

  • Below that I've used linear algebra, primarily to solve linear equations, which has been useful to me in many programs.

  • I've also done some symbolic differentiation to find minima of functions.

  • Finally, I've used high-school trigonometry to calculate distances between points defined by GPS coordinates and to do various other geographical calculations related to my hobby of geocaching.

Norman Ramsey
+1  A: 

The hardest Math I found myself using was more on the comp-sci logic department, namely, Karnaugh Maps..

I had encountered a rather nasty multi-tiered query that had to be written unifying about 12 tables in a special way, because doing it wrong resulted in a Cartesian crossproduct which would have made quite a mess.

The Karnaugh map diagnosis allowed me to work out the parts of the database I wasn't really needing to analyse to get my product, which eliminated my bottleneck, made it easier to write the complex query, and returned instantaneously instead of dying and going out to lunch for 15 minute.

Kent Fredric
+1  A: 

Really this question speaks to how broad a term "programming" has become; really now it just means "getting a computer to do something new." This is a really wide field of endeavour that ranges from banging together shell scripts to literal rocket science.

Trying to put it all under one word is like trying to lump together all "automobile workers". You don't need differential calculus to drive a car, and you probably don't need it to fix a car, but you definitely need it to design a car.

Crashworks
+5  A: 

Here's a summary of the answers. The following subjects were mentioned a lot:

  • Linear algebra, including vectors and matrices
  • Statistics and probability
  • Calculus, mostly one variable but also some multivariable
  • Geometry, including trigonometry here
  • Discrete math, including combinatorics and graph theory

Differential equations were mentioned frequently. Some subjects (financial math, numerical analysis, Fourier transforms) were mentioned a few times, while a few people mentioned more unique subjects (control theory, queuing theory, complex variables, measure theory). On the flip side, some people have mentioned that their mathematical needs were very slim, being bounded from above by arithmetic, algebra, or calculus, depending on the person.

A. Rex
+1  A: 

I do electromagnetics work, so I've use trig, linear algebra, diff eq, control theory and calculus all the time. I also convert between the time/frequency domain quite often (fast fourier transforms) and perform coordinate system transformations.

temp2290
+1  A: 

What a great question! Let's see:

  • Calculus (mostly differential)
  • Differential equations
  • Linear algebra (matrices)
  • Statistics (bayesian and frequentist)
  • mixed-effect modeling
  • Markov-chain Monte-Carlo (MCMC)
  • Information theory (both Shannon and Kolmogorov)

...

Mike Dunlavey
+1  A: 

Calculus, linear algebra, all kinds of vector stuff for videogames.

But most impressively, I've used Mathematica to simplify some formulae.

Nosredna
+1  A: 

working in the innards of a database product math, I haven't needed much more than bit operations in 10 years. Once I used a differential approximation to do an error bar calculation, which was sadly the most for me.

Peeter Joot
+1  A: 

Fourier transforms. When trying to find patterns in forex and stocks, the frequencey domain is much easier to analyze than the time domain.

Esteban Araya
+2  A: 

Almost any mathematics can be used to solve a problem, hence almost any maths can be useful to programming. But what I've discovered is that having studied a particular branch of mathematics helps you recognise that the problem you face has a well known solution. Often you face a practical problem, organise this or that data, when you realise that most of it can be quickly calculated as needed from some simple analysis result.

I have found bayesian probability in the most unexpected of places, along with integrals, geometry, statistics, infinite series, numerical methods, and many, many graph theory results. And physical mathematics, optics and dynamics, has come up in some 3D programming I have done.

The only mathematics I have studied that I haven't stumbled across in programming to date is certain results in differential geometry (Guass maps, etc) and Godel's incompleteness theorem.

Of all of it, I would say that graph theory is the most common.

David Crawshaw
+3  A: 

I wouldn't personally go about trying to "learn" math by itself. I find that if I teach myself things in anticipation of actually utilizing them, I quickly forget everything as I have no real world experience to tie it to. (I hated school)

I would suggest instead writing more code. RPG or Strategy games are great as bottomless-pit never-finish projects because of all of the math you end up doing if you start from scratch. It seems like everything's going to be really easy, then you decide to figure out how to calculate Field of Vision realistically and programmatically instead of just having a static circle, and all the sudden you're drowning in crazy Algorithms and actually have a reason to learn some new and interesting math. It's much more rewarding when it's "Yay my guy can see now, but not through walls or monsters. Exactly what I wanted!" as opposed to "Yay I now know that x = 7!".

http://mitpress.mit.edu/sicp/full-text/book/book.html < Read this, too.

I realize I didn't actually tell you what kind of math I use, and that's ok. I really only wanted to tell you to spend your time somewhere that you will see more benefit from.

If you really need to know, It's a crazy blend of basic algebra and assorted random other functions, some geometry, calc, stats, a whole list of other stuff I could never name. I would still fail a math vocab/remember 20 formulas exam and I couldn't really tell you any of the names of what anything is. But I can comfortably say I know enough to teach myself how to do what I want to do to the point where it isn't a problem. The only time I would have a problem is if I had to do something really specialized that I had absolutely 0 experience with, like some crazy nuclear physicist rocket science stuff. Making a video game version of that to be fun (and not realistic because reality does not make a good video game) would be much easier/entertaining. I fit into a weird rift of space between programming and art.

Sneakyness
+1  A: 

The Discrete Wavelet Transform, for my Bachelor thesis.

luvieere
A: 

This is a loaded or short-sighted question. (Ideally) in life you seek to do what you enjoy or find fascinating. If what you enjoy happens to be mathematical, and you want to do it right or be regarded as an expert, then of course learning the math is necessary. If your attitude is to be discouraged about using math and you seek to do the minimum, then I'm sure correspondingly you'll be using much less math in practice.

peter karasev
Please re-read the second paragraph of the question, particularly the word "not". This was a survey ...
A. Rex
+2  A: 

I once used a little abstract algebra to simplify the code required to reconstruct geometry and camera motion from photography. By curious coincidence, I used this to solve a bunch of problems that came up during the post-production on the Matrix sequels (yeah, yeah, I know they sucked).

The idea was that I was using a technique called automatic differentiation to compute derivatives of some fairly large functions. Although there is a lot of literature on how this works, I found it much easier to implement it if I thought about it in terms of working in an algebraic structure with nilpotent elements, ie. non-zero numbers whose square (or higher powers) is zero. It also helped to think about tensor products of algebras when getting a handle on how nth derivatives work in this framework.

Anyway, I wrote it all up as a paper.

I've also found it useful to have experience of Lie algebras (and the differential calculus of manifolds in general) when implementing optimisations over Lie groups, eg. finding the rotation that best fits some purpose. There are sometimes better ways than simply parameterising SO(3) with three coordinates and using a black-box minimiser for 3D euclidean space.

By the way: there is a vast body of mathematics used to make movie visual effects.

This is very cool to hear about. Thanks for commenting -- I've seen you around on reddit and MO before and didn't realize you worked on this stuff. Incidentally, I ran into some discussion of automatic differentiation recently at http://blog.tanyakhovanova.com/?p=275 .
A. Rex
A: 

I think I used the multiplication operator once. It had Something to do with prices.. Don't really remember.

Oren A
+1  A: 

i always like to think programming itself as high-level mathematics. the basis of what we are dealing in programming is all discrete mathematics but the abstractions we use in programming differ from that of mathematicians to some extent because they are really high level. this difference arises from the fact that programmers exploit a feature of computers which is not quite available for classical mathematics, massive iteration. coming back to your question, i think what you mean by "high level" is "advanced" and if this is the case, for me it was differential equations. pheww, they are hard.

mock_turtle