# How is math used in computer science?

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

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:

Functional programming

Distributed systems

Machine learning and

__artificial intelligence__

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?

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*