# Math via Computers

What computer language is best for doing mathematics? That is, which of C or Ruby or whatever would generally be the widest applicable efficient computer language to master for doing mathematics? In response to a question posted below: The idea is a single programming language to use as a tool in a wide variety of advanced mathematics situations ... representation theory, topology, or whatever (maple or mathematica might be choices but how useful are these when thinking about, say, problems in algebraic geometry?)So, thinking further, open source pre-wrote programs in the language for typical tasks in various math areas would be a big plus.Based on Michael's answer below it looks like SAGE would be ideal as it is OPEN SOURCE, in PYTHON, written by a MATHEMATICIAN. (see https://en.wikipedia.org/wiki/Sage_%28mathematics_software%29 and http://www-rohan.sdsu.edu/~mosulliv/Courses/sdsu-sage-tutorial/sageprog.html) Unless someone can think of a better OVERALL tool then feel free to make a suggestion. Having no cost is a nice perk. If you find this interesting then you might check out the basic tool: https://www.wolframalpha.com/

• Do you mean theorem proving or do you mean computational mathematics and implementing algorithms?
– Seth
Apr 21 '14 at 16:14
• All are good. It depends on how you make a good syntax program. Apr 21 '14 at 16:14
• I like Sage. It's built on Python, which is very easy to learn. See here. Apr 21 '14 at 16:40
• I wonder if someone seriously uses haskell and what for.
– tom
Apr 21 '14 at 19:50
• If by "doing mathematics" you mean the (computer-assisted) construction and verification of proofs, then I think Coq would be a pretty good choice. There is a nice tutorial by Mike Nahas. Jan 27 '17 at 5:04

That depends on what you mean by doing mathematics. Here are some choices:

1) You want to perform some numerical computations, such as SVD decomposition of moderate size numeric matrices, numerical modelling, etc. Most engineers choose Matlab for things like that.

2) Ditto, with emphasis on statistics. Most statisticians prefer R.

3) Your mathematics includes a mix of symbolic computations, not-too-large numeric computations, and you want to visualize a few things. Mathematica seems to be the prime choice for that.

4) You are a working mathematician, doing research in algebraic geometry, and want to experiment with things like "what are Chern classes of this and that hypersurfaces in $CP^3$". There's SAGE for that.

5) You are developing software that needs to process huge amount of data fairly fast. Something like numeric optimization in $10^6$-dimensional space. You've got to use C++ with MPI for that.

• I agree overall, but I must mention Python + SciPy + Matplotlib (plotting) + Pandas (data manipulation). Sympy for symbolic computation/optimization. Apr 21 '14 at 19:41
• First three (and partially 5) can be replaced with Python. Apr 22 '14 at 4:08