Is Math Useless in Computer Science Degrees? — Simplified

Yaman Omar Alashqar
3 min readApr 1, 2022

--

I always hear students complaining 😭 about math subjects in computer science degrees, such as linear algebra, probability, or calculus, and that it is completely useless for a programmer.

✔ FACT: Computer Science is derived from mathematics.

For Many Cases, NO MATH IS REQUIRED. But…

Let me start with a quick introduction, imagine we have two people (a marathon runner, and another lazy guy that spends 16 hours a day lying on his couch), what if they both enter a 50 kilometer biking marathon for the first time? who’s muscles are ready? got it?

In general high-level programming does not require math, while math and programming both require problem-solving skills (they both flex this muscle 💪 in your brain), and they both require building logic around numbers. Furthermore, the direct use of math in programming depends on the type of application, so basically it depends on the context.

So what if you wanted to create a navigation app 🧭 ? For example the part that calculates the shortest distance between two points? You will need to understand the graph theory … in addition to some proofs and theorems like Depth First Search, Breadth First Search, Topological Sorting, Dijkstra’s algorithm, and much more.

Creative thinking

Before taking things deeply technical, let’s use simple and easy words to understand my point. What if I told you read a number (n) from the user and calculate the sum from (1) up to (n)? Most people will use a loop to iterate over the numbers from (1) up to (n) then calculate the sum (sum = sum + i), and that gives us a 100% correct output … but what if I told you it could be solved in a single tiny line of code … (sum = (n*(n+1))/2) 🎩ta-da🎩. Even though the example is so simple, yet it shows the difference between an ordinary programmer, and a true problem solver that uses the power of math in his code.

How about cryptography? Boolean logic? Chess game? Graphics processing? Weather prediction? Does it make sense to wonder if math is related to programming yet?

Learning programming is like learning math.

In other words, there is a correlation between understanding mathematics and being able to think “algorithmically”. Moreover programming is essentially applied math. Algorithms are just a set of instructions based over mathematical logic.

Computers are made of math …

What about Machine Learning / AI / Data Science?

Even though math is a requirement for these fields but it does not show up as you might think (you are not required to write complex equations within the code itself), although you should understand what’s happening around you.

Analyzed data is represented and expressed using matrices, therefor you should say hi 🙋‍♂️to “Linear Algebra”. Terms such as linear equations, linear transformation, vector, matrix, transpose, are crucial.

Algorithms within machine learning and data science often use models of probability distribution, which means that you will need to gain a solid foundation in probability and statistics.

How Much Math Do You Actually Need To Know?

The answer for this question varies depending on the field you go into, although some fields require solid math skills but for most developers no more math than basic algebra and basic discrete is needed, use Google if things get complex. But if you want to build your own complex algorithms, or maybe you're into customizing machine learning and data science models, or maybe building a complex rendering engine, or transforming scenes for a 3D game, or implementing a new encryption algorithm, and so on … then that's a sign that you need to build some mathematical muscles.

In conclusion, it is not math itself that gives you a step up in daily programming, but the logical process behind it. Without an understanding of certain concepts in mathematics, programmers are left without the tools they need to succeed and build new things, So without a doubt, math will make you a better programmer.

CONTACT ME FOR ANY HELP/SUGGESTIONS (OR EVEN TO SAY HI 😎)

--

--