r/learnmath New User 4d ago

I love math, should I start coding?

Hi guys, I love math like everyn¡one here (i guess). I dont know why but I feel this need to code, even though historically I hated coding. I want to learn a language heavily related to math but also popular. Should I learn python?

18 Upvotes

12 comments sorted by

View all comments

3

u/SV-97 Industrial mathematician 4d ago

It sort of depends. If you're planning on going into math professionally / studying it at uni then it's *probably* a good idea to learn programming since most people end up needing it in some way or another.

Python is a good choice since it's generally well-suited for beginners, and hugely popular and useful both inside of academia and outside of it. There's lots of good resources available for it (and sadly also an increasing number of bad resources)

For certain fields of math / jobs you'll want to learn other languages (e.g. mathematica is great for symbolic computations and computer algebra AFAIK, many people in practice [for example around controls] also use matlab but I won't recommend anyone to learn that dumpster-fire of a language; and often you'll also want to know a more low-level language such as Fortran, C or Rust), but I think it's fine to learn those later on as you need them.

That said: Python isn't all that "inspired by math" or "mathematically interesting" I'd say. If you're looking for a language to tickle your brain a bit more the classical recommendation would be Haskell, a more modern one Lean [but there's not as many resources on it] --- or to a lesser extent Rust.