edX Online

How is math used in computer science?

How Is Math Used In Computer Science.png

At their core, computers are number-crunchers. Just think about the word “computer” — something that computes. Even if you use your laptop to send emails more often than to balance your bank account, there’s math going on inside the machine.

If you aspire to a career in computer science, you may wonder how much math you need to know to succeed. The answer depends on what you want to do with your computing career, and how advanced you want to get.

Do you need math in computer science?

Because math is a foundational part of computer systems, every programmer and computer scientist needs to have basic mathematical knowledge. The type and level of math you need depends on what areas of computer science you want to work in.

Some computer science career tracks require only minimal mathematical knowledge. For example, as long as you know basic programming languages and can do simple arithmetic, you can develop basic mobile apps.

But if you want to go further with your computer science career, perhaps exploring advanced fields like computer security or operating systems, you’ll need to understand some higher-level math concepts. No one expects computer scientists to be mathematicians, but studying high school and college-level math can open doors.

"[In computer science education] you learn more about data structures and algorithms. That's kind of the core, the math side of computer science."

“[In computer science education] you learn more about data structures and algorithms,” says David Joyner, PhD and executive director of online education for the College of Computing at the Georgia Institute of Technology and instructor for edX’s Introduction to Python Programming Professional Certificate program.

“That's kind of the core, the math side of computer science. Those are very, very important because they give you a deeper knowledge of what developing with computers really is all about."

Dive Deeper

Dive Deeper

Math is fundamental to computer science, but an affinity towards math is not a prerequisite for success in the field. For example, the final course in the Python program Joyner is an instructor for, Computing in Python IV: Objects & Algorithms, covers object-oriented programming, a popular paradigm that Joyner likens to philosophy. “Object-oriented programming speaks to my general desire to make people aware that computer science isn't just for the people who were really good at math in high school. It’s an area of programming that has a surprisingly deep conjunction with philosophy,” Joyner adds. “I think that's one thing that people often underestimate about careers in computer science, is they are very creative kinds of areas.”

What kind of math is used in computer science?

Computer scientists use all different types of math. Those who work with advanced algorithms and matrices, like the kind involved in image recognition for medical diagnostics, need to understand higher-level concepts like differential equations.

But for aspiring and first-year professionals, it’s more important to master number theory and basic equations. Here are some topics to explore.

Binary and hexadecimal counting

The binary number system uses only two digits, 0 and 1, to express all mathematical concepts. Computers use the binary system instead of the more common decimal system, so computer scientists need to know how it works.

Computers can read binary, but it can be inconvenient for humans to deal with. As an alternative, computer programming has turned to a system called hexadecimal, which uses all nine decimal digits and the letters A through F. It makes more sense to humans and converts electronically to binary.

Don’t let the unfamiliarity of these languages scare you away. Computer science programs tend to cover them early on, so you can start practicing right away.

Discrete mathematics

Discrete math is tangible math. It analyzes the relationship between things that are distinct and separate. The concepts of discrete math include:

  • Probability

  • Combinatorics

  • Logic

  • Number theory

  • Graph theory

The problem-solving processes of discrete math are the basis of modern computer engineering. They power both simple and complex disciplines such as:

As a computer science professional, you might use discrete math to test out multiple algorithms and learn which is the most efficient. Meanwhile, the logical thinking you develop as a discrete math student will help you to approach programming and development tasks more methodically.

Statistics

Data has become an increasingly important aspect of scientific computing in the past few years, from machine learning to personalized app performance. This increased reliance on data has made statistics an important topic of study for all computer science students.

Statistics allow computer programs to deliver accurate generalizations and predictions based on available information. Understanding statistics can make it easier to grasp concepts like:

  • Data mining

  • Machine learning

  • Future modeling

  • Speech recognition

  • User responsiveness

  • Computer graphics analysis

The more you learn about statistics, the more adept you’ll become at managing and using complex data structures. This lets you write more advanced algorithms and push the envelope in software customization.

Linear algebra

Computer science and software engineering rely on algorithms. An algorithm is a formula that takes you from a specific input to the correct output. If that sounds familiar, it may be reminding you of middle school or high school algebra.

Algebra includes concepts like:

  • Exponents

  • Polynomials

  • Linear equations

  • Quadratic equations

Each of these concepts has real-world computer science applications. Understanding exponential relationships can help you to adapt visuals so they appeal to the eye. Solving linear equations helps with analysis of algorithms because it helps you to spot inaccuracies.

You can get by in software development without knowing much algebra, but learning it can help enhance your capabilities.

Calculus

If you plan to get a computer science degree, you’ll probably take a calculus course at some point.

There are two different types of calculus: integral calculus and differential calculus. Together, these disciplines help you to figure out rate of change, which is an important ingredient in many algorithms and programs.

Differential equations are particularly important. A differential equation calculates how something changes and how fast that happens, so a computer can predict future outputs. This helps with:

  • Designing simulations

  • Improving problem-solving programs

  • Creating effective algorithms

  • Developing accurate graphs

The word “calculus” scares some computer science students, but the key is to find a course that will lead you through what you need to know to work in your field.

Mathematics and computer science: What do you need to get started?

The more math you study, the deeper your understanding of computers will become. But does that mean you have to become a mathematician before you start your computer science studies?

Absolutely not.

Today’s computer science educators know that everyone has different backgrounds. They build mathematical learning into their curriculum so that students have the best chance to succeed.

DID YOU KNOW?

DID YOU KNOW?

If you take an edX computer science course, you’ll find mathematical concepts and practice built into your learning. For example, the Computing in Python I course from Georgia Tech includes curriculum units on variables and mathematical operators, specifically focusing on how these skills work in computing.

You can get started in computer science with just the math skills you have now, or you can take a course to brush up on what you know and gain more confidence.

Get started: Explore math with edX

All computer science professionals need at least some knowledge of math. The computer science courses you’ll find on edX all include some math learning, but some students might still feel like they want some focused math coursework before getting started.

On the edX platform, you’ll find a variety of math courses relevant to the computer science student. Options include Introductory Linear Algebra, Fundamentals of Statistics, and Pre-University Calculus. Learn more about edX math courses today, and get yourself started on the fast track to a computer science career.

Last updated: January 2024

Computer Science
Career Tips