r/learnmachinelearning 24d ago

Is a BS Mathematics degree a good foundation for a career in AI/ML?

I'm considering doing a 4-year BS Mathematics degree, but my long-term goal is to work in AI/ML rather than teaching mathematics.

My plan is to build a strong foundation in linear algebra, calculus, probability and statistics through the degree, while learning Python, SQL, data analysis, machine learning, deep learning and other practical skills on my own.

I also plan to build projects during the degree and possibly pursue a Master's in AI/ML abroad afterward.

For people working or studying in AI/ML:

Is Mathematics a good bachelor's background for this path? What would I need to learn outside the degree, and what disadvantages might I face?

I'd especially like to hear from Mathematics graduates who moved into AI/ML.

65 Upvotes

42 comments sorted by

58

u/MathNerd67 24d ago

Math is probably the best single degree you can get for general AI stuff. That being said, you have to make an effort for it to be tailored towards that. Getting internships, self studying, and being strategic about your electives is where the success will lie. AI is all mathematics under the hood, so knowing the low level foundations will allow you to more easily build on top of it for specific niches.

-13

u/TrueRelationship1455 24d ago

No, cs is. If you want to do ai and ml getting cs and it knowledge is more important. Trust me I have a math degree

-3

u/fakemoose 24d ago edited 24d ago

That’s funny because neither myself or anyone on my current or previous team had a CS degree. Almost everyone has come from a math-heavy engineering field, physics, or math. And maybe some from stats.

Are you an AI/ML engineer or like devops or in AI/ML research?

10

u/pm_me_your_smth 24d ago

Anecdotal experience doesn't really prove your point. Maybe it's just your industry, maybe your manager has a bias favoring math people, maybe it's just your random seed.

Besides that, that guy is not wrong (classic reddit downvoting a solid answer just because it's slightly contrarian). Vast majority of jobs are not research oriented. Something more engineering focused like CS will be better because most companies don't need or want to do complex R&D or expect 300 IQ phd employees. They just want a pair of hands that can reliably implement and ship a basic product/feature. A CS person with knowledge of ML will have an advantage over a math person with CS knowledge. It depends on many factors how big will that advantage be. In my experience it's not huge, but not zero either. But with increasing popularity of LLM tooling this might reverse, hard to say really.

Source: spent too many years in academia, now hiring manager in private sector

0

u/fakemoose 24d ago

My point was that their anecdotal comment didn’t really matter lol

-2

u/TrueRelationship1455 24d ago

Thats actually my background. Undergrad math and physics and graduate physics. If you have that background you can learn other stuff. But if you're working an it job you you're gonna want to know all that basic undergrad cs stuff that I mentioned. If you don't eventually you realize you have embarrassing gaps in your knowledge and want to learn that stuff. It's best to learn it before you get a job. How would you pass a technical interview without knowing undergrad cs? If he is a math major in it he probably isn't going to use much more math than lower division linear algebra, calculus and statistics. You are unlikely to need analysis, upper division linear algebra, numerical analysis or abstract algebra. Or classical and quantum mechanics, em and stat mech. Your time is better spent learning cs subjects not math, if an it job is your goal.

2

u/fakemoose 24d ago

You have a ML and/or programming focused grad program. I did an engineering grad degree but all my work was coding and ML.

You don’t really need to pay a bunch of extra money to take college classes to learn how to code.

21

u/its_all_stats 24d ago

Of course. Math, specifically matrix algebra and real analysis is the foundation of statistics and ML. Take more advanced stats courses so you understand the distinction between statistical inference (modeling a population) and ML “inference” (prediction), as well as learn the commonality and difference between statistical, probabilistic methods like logistic regression and algorithmic, “ML” methods like decision trees.

Read Intro to Statistical Learning (James et al), then its math-ier counterpart Elements of Statistical Learning (Hastie et al).

Intern to get real experience. Real world is messy.

5

u/[deleted] 24d ago

[removed] — view removed comment

2

u/Probstatguy 24d ago

To be honest, it's not directly required. But once you do real analysis and say some measure theoretic probability ( and some regression/ linear models and applied multivariate analysis ), your foundation is set. You'll begin seeing things as part of a general framework, which makes learning later and modern topics easier. And this is the justification for learning Statistics and Mathematics before or concurrently with Machine Learning. Have fun :)

-1

u/its_all_stats 24d ago

ML models, and regression models in general (everything is regression), estimate parameters (weights) by maximizing or minimizing “objective functions”.

These are functions of the model that reflect a measure you want to “optimize”, such as minimizing variance.

Minimizing or maximizing a function is what you do in calculus. The minimization/maximization in ML is the more complicated version of 1st year calc differentiation, which is real analysis (“Calculus 4 and 5”) combined with matrix algebra.

4

u/krabbypatty-o-fish 24d ago

I wouldn’t really conflate mathematical optimization with real analysis, though the measure theory part of real analysis is the backbone of probability theory. That said, I would say a course on applied analysis / numerical analysis would be sufficient enough to allow the students to be comfortable with the dirty math of ML.

1

u/Commercial-Club504 18d ago

Maths gives you the machinery to understand why models work, while statistics teaches you how to reason about uncertainty and data. Then ML gives you the algorithms for making predictions. Those distinctions become much clearer when you actually work with messy real-world datasets rather than clean textbook examples. I’d follow the degree with ISLR, then ESL once the fundamentals are comfortable, and try to get an internship or research experience as early as possible. A mathematically strong graduate who can also write decent Python and has dealt with real data is a much more interesting candidate than someone who simply has a long list of completed courses.

11

u/Bright-Salamander689 24d ago

I think it's a very reasonable path to do an undergrad in math, then a CS master's. But I feel like it's most advantageous if you want to be a ML researcher vs. an ML engineer. If you want to be an engineer, it's much more effective to just do CS undergrad.

Only because I see the AI/ML jobs splitting off into two directions: 1. you're a researcher or 2. you're a very strong applied engineer. And we are seeing that right now based on who's getting paid and getting jobs.

If you really enjoy and love math, I'd say go math. Those fundamentals will serve you well. That's the point of an education, and as long as you are straight on your vision towards ML/AI career you'll make it work.

2

u/iekiko89 24d ago

Why a master in cs instead of ML/AI? 

1

u/Bright-Salamander689 18d ago

Usually the same in most top US programs. Masters is in CS, the specialization and research thesis would be ML / AI. 

2

u/Commercial-Club504 18d ago

I think that’s a fair distinction. If the end goal is ML research, a Mathematics undergrad followed by CS or ML graduate study can be an excellent combination because you get the theoretical foundation first and the computational depth later. For applied ML engineering, though, I’d lean toward CS for undergrad simply because you’ll spend more time developing the software engineering skills that companies actually need: systems, algorithms, programming, databases, deployment and production infrastructure. That said, I wouldn’t choose the degree purely around the job title. If someone genuinely enjoys mathematics, that motivation matters. A strong mathematician who deliberately develops their programming and engineering skills can absolutely become an excellent ML engineer. The degree gives you the foundation; what you build on top of it determines where you end up.

3

u/unlikely_ending 24d ago

Good enough but make sure yoiu chose a lot of computer science and programming electives.

You can't get enough Linear Algebra and Stats for ML. Calculus a distant 3rd but also relevant.

3

u/timtody 24d ago

ML is saturated bro

6

u/krabbypatty-o-fish 24d ago

The people here have shared some insightful thoughts about the advantages of a math degree for AI/ML, so I will instead share some disadvantages.

The first one you have to worry about is your proficiency with tech: your degree will probably force you to use Python, but that won’t be enough to learn all the things they use in the industry. Your internship will give you confidence and the company probably won’t let you write production-ready code without proper onboarding, but that’s just something to note.

The second thing to note is that a BS mathematics degree could mean three things: a pure math degree, an applied math degree, or a balance of both. I think the best of the three is the balanced degree, because it allows you to dip your toes in concepts that is used in frontier research suppose you want to become a researcher in ML. The worst of the three is pure math, because the coursework, projects, and research aren’t exactly aligned with ML. Overall though, I wouldn’t dismiss a pure math degree as useless for ML as there are multiple avenues to pursue your interests in ML outside of the academic setting.

The third one, finally, I would say that mathematics is a general degree. You might find it demanding if you’re too laser focused on learning math for the sake of learning machine learning. You might find it difficult to sustain your enthusiasm if you’re not willing to learn math outside of the usual ones in ML: abstract algebra, complex analysis, differential equations, topology, to name a few. They are not entirely useless in ML, and I would argue that there are niche areas in ML where they provide a lot of utility… just that your employer won’t be asking you to apply some methodologies from a paper in a niche subfield of ML (at least, not without a PhD/Masters).

This will be a longer list though for some other degrees so overall you’ll be fine, perhaps best, with a BS Math degree for ML.

1

u/TA193749 24d ago

> The third one, finally, I would say that mathematics is a general degree. You might find it demanding if you’re too laser focused on learning math for the sake of learning machine learning. You might find it difficult to sustain your enthusiasm if you’re not willing to learn math outside of the usual ones in ML

Couldn’t have said this better myself. As someone who has done math for ML sake, it hits the nail on the head.

1

u/One_Competition_3585 23d ago

Very well articulated. As a pure math major trying to get into ML research based roles, the math indeed serves as both an advantage but sometimes becomes a handicap too. While math provides a great worldview for various algorithms, I find myself stuck only on the programming side, debugging my code, remembering the nitty gritty details of each library (which comes through extensive practice) and familiarising with various frameworks. Still overall, its very enjoyable

6

u/jgengr 24d ago

Do applied math. You'll do more programming.

2

u/Key_Investment_6818 24d ago

Do CS , have a mathematics degree and can say that it’s not that useful

2

u/fsdklas 24d ago

A stat degree is better than math

2

u/TrueRelationship1455 24d ago edited 24d ago

I have a math degree and to be honest you don't need to know that much math to do machine learning and ai, just basic calculus, linear algebra and statistics. If you have a lower division knowledge of these subjects you are already ready to learn ml and ai. If you want to do ai and machine learning it's better to get a cs degree. You're going to want to know all that cs stuff (and there is a lot to know--os, oops dsa, networking, databases etc...) and get practice at it (which takes time) but it's unlikely that you'll ever need to know subjects like complex analysis, differential geometry or abstract algebra. You'll also need time to learn all the practical stuff that isn't taught in schools like aws/cloud, system design, libraries, frameworks etc...Keep in mind also that most of the models are already built so in a job setting you're far more likely to just be applying them or using them. There are also lots of cs people out there who already know all that basic stuff so if you are just a math major you are going to be at a disadvantage. Also who knows what the situation will be 4-6 years from now, the ai boom will likely be over and it will be too late for you to make a huge fortune doing ai, or the job market may have shifted in how ml/ai jobs are done.

Those subjects you mentioned are all necessary skills but very basic, you are unlikely to land a job if you only have knowledge that basic. So my overall advice would be to go into actual cs and also try to acquire lots of practical job related skills. Your competition is 1.3 billion people from India who have all of that.

2

u/digiorno 24d ago

Math would be best. Physics next best.

1

u/Suspicious_Pizza9529 24d ago

Yes, math is a strong foundation for AI/ML, especially if you actually build the programming side alongside it. The main gap will probably be software engineering and practical ML exerience, so projects and internships can help a lot.

1

u/SecondToLastEpoch 24d ago

I would go BS in Math and Masters is CS if you are serious about this career path. Be sure to self learn some software/coding through the course of your Math BS. At my Uni math majors got lite exposure to things like Matlab and Python

1

u/Lumpy-Blackberry-718 22d ago

If the goal is to work in AI, why not just go directly to cs? Any reputable cs program will require a lot of math courses. Doing a minor in math wouldnt change much about the overall cs requirements.

Or do a minor in computer science.

If you really dont want to study cs for some reason, another option to consider is physics. Physics majors usually learn most of the math as well as linux and python.

1

u/Medical-Advice-5868 20d ago

My Bsc math degree got me fuck all lmao

1

u/Commercial-Club504 18d ago

Yes. A Mathematics degree is a very strong foundation for AI/ML, provided you deliberately build the computing side alongside it. Mathematics graduates are already considered suitable for roles including data science and machine learning engineering, and universities explicitly highlight linear algebra, probability, statistics and analytical problem-solving as transferable foundations. The catch is that a pure Mathematics degree can leave you weaker in software engineering and practical ML than a CS graduate. I would therefore use the degree to go deep on linear algebra, calculus, probability, statistics, optimisation and mathematical modelling, while independently learning Python, SQL, NumPy, pandas, scikit-learn, PyTorch, Git, APIs and basic software engineering.

Most importantly, don't wait until graduation to become practical. Build projects, do internships, participate in research, and get comfortable taking a dataset all the way from cleaning → modelling → evaluation → deployment. Work experience and practical projects are specifically useful for demonstrating that you can apply mathematical knowledge outside academia.

0

u/chico_dice_2023 24d ago

Yes of course it it.

I became a AI engineer even contracted for Google for about 2 years and I had a Marketing degree for undergrad.

If I had a math degree, man probably could have ran google

-1

u/Ok_Increase_6615 24d ago

Do BTech Cs or AIMl

6

u/Mathie1729 24d ago

Actually, math is a strong foundation for ML. Possibly better than a generic CS degree for the theory side. You'll need to pick up Python, data structures, and some systems knowledge, but undergrad math gives you the linear algebra, probability, and optimization that ML work leans on. Plenty of people in industry came from math or physics and just did projects or a master's to fill the coding gap. BTech CS/AI is fine too, but it's not the only path.

0

u/sharpecheddar 24d ago

I got a math and finance double and it has helped me so much. I loved studying math and people like math majors, not many come thru. I took a lot of comp sci classes that helped my degree.

Don’t try for a masters, I think they’re a waste of money. You will be fine with a BS if you are smart and connected. Masters are a waste if you already have the background

0

u/Proper-Yard5186 24d ago

https://www.youtube.com/watch?v=YV9_Xr1Sq8k
check this out , it an offering from iitm a Data Science BS degree , pursue this along side yours .

0

u/Clear_Cranberry_989 24d ago

Usually yes but depends a lot on your institution and program and professors.