Home/MIT OpenCourseWare/Mathematics for Computer Science (6.042J)
MIT · on MIT OpenCourseWare

Mathematics for Computer Science (6.042J)

4.8(5,000)·800K enrolled
Intermediate 40 hours English None CertificateFREE

About this course

Mathematics for Computer Science is the discrete math course at MIT that underpins algorithm analysis, cryptography, and the theoretical foundations of computing. It covers mathematical proof techniques, number theory, graph theory, probability and counting — the mathematical machinery that algorithm proofs, data structures analysis, and cryptographic systems depend on.

This is the course most self-taught developers identify as the largest gap in their CS background — they've learned to build software but haven't been exposed to the mathematical reasoning that proves why algorithms work or bounds their performance. Tom Leighton and Albert Meyer teach it with the rigor of MIT's undergraduate CS curriculum while keeping concrete examples that connect the math to real computer science applications.

What you'll learn

Write and evaluate mathematical proofs (direct, contradiction, induction)
Apply number theory to cryptographic and computer science problems
Analyze graphs and graph algorithms using graph theory
Apply counting and probability to algorithm analysis and CS problems
Reason formally about algorithm correctness and complexity

This course includes

40h
On-demand video
Yes
Mobile access
English
Language
Comparison · LBS

Compare alternatives for Mathematics for Computer Science (6.042J)

Same topic, different options. We surface the trade-offs others hide so you can pick the course that actually fits your time, budget, and goals.
MIT OpenCourseWare4.8(5,000)
Mathematics for Computer Science (6.042J)
Price
Free
Completely free, openly licensed — no certificate
Duration
40 hrs
Level
Intermediate
Certificate
MIT OpenCourseWare4.9(15,000)
Linear Algebra (18.06)
Price
Free
Completely free, openly licensed — no certificate
Duration
34 hrs
Level
Intermediate
Certificate
Stanford Online4.9(9,000)
CS231n: Deep Learning for Computer Vision
Price
Free
Free lecture materials; some versions paid
Duration
50 hrs
Level
Advanced
Certificate
Stanford Online4.9(7,000)
CS224n: Natural Language Processing with Deep Learning
Price
Free
Free lecture materials; some versions paid
Duration
50 hrs
Level
Advanced
Certificate
Prices & availability can change — confirm on the provider's site. We're not affiliated with any single provider.

Instructor

TL
Tom Leighton / Albert Meyer
MIT OpenCourseWare instructor
800K+ learners6 courses4.8 instructor rating

Taught by Tom Leighton (MIT professor and co-founder of Akamai Technologies) and Albert Meyer, MIT Professor of Computer Science — both known for connecting mathematical theory to practical CS.

Requirements

  • Basic algebra and some programming experience recommended
  • No prior proof-writing or discrete math experience required

Who this course is for

  • Self-taught developers who want the discrete math background formal CS degrees provide
  • CS students supplementing coursework with MIT-level materials
  • Software engineers preparing for algorithm-heavy technical interviews

About this provider

MO
MIT OpenCourseWare
MIT OpenCourseWare — free, openly licensed course materials from MIT's actual courses, including lecture notes, problem sets, and exams. No certificate.
Visit MIT OpenCourseWare

Frequently asked questions

For most web and application development — indirectly. For algorithm work, systems programming, cryptography, and anything involving formal correctness — directly and significantly.
Genuinely challenging — MIT-level rigor with proof-writing as the primary activity rather than coding. Budget significant time per problem set.
No certificate from OCW — the course materials are freely available without credential.
Free
to audit
Enroll now