Mathematics for Computer Science (MIT 6.042J textbook)
by Eric Lehman, F. Thomson Leighton, Albert R. Meyer · MIT OpenCourseWare
Free MIT textbook for 6.042J. Chapter 4, Mathematical Data Types, defines functions and binary relations, covers injective, surjective and bijective maps, and relates them to finite cardinality. The directed-graphs chapter treats equivalence relations and partial orders.
More resources on Relations & Functions
Discrete Mathematics and Its Applications
Standard undergraduate discrete mathematics textbook covering logic, proof, sets, functions, algorithms, number theory, counting, relations, graphs and trees, with thousands of exercises. Its relations chapter develops equivalence relations, partial orders, closures and matrix representations to a level suited to computer science study.
Wolfram MathWorld
MathWorld is an online mathematics encyclopedia from Wolfram Research offering detailed, browsable articles on topics across the math spectrum, including algebra, geometry, calculus, and number theory. Each entry includes definitions, theorems, formulas, diagrams, worked examples, and links to further reading.
Discrete Mathematics: An Open Introduction
Oscar Levin's free, openly licensed textbook for a first discrete mathematics course, with interactive exercises and solutions. Its opening chapter treats sets and functions, including injections, surjections and bijections, before counting, sequences, logic, proofs and graph theory; relations get little coverage.
Khan Academy Functions
Algebra I unit of video lessons and graded practice on function notation, domain and range, graph interpretation, and inverse functions. Progress is tracked per skill, so learners can identify which specific ideas still fail.
Mathematics for Computer Science (MIT 6.042J)
Discrete mathematics for computer science with an emphasis on definitions and proofs: logic, induction, sets and relations, graph theory, modular arithmetic, asymptotics, counting and discrete probability. 25 lecture videos, problem sets and exams with solutions build fluency in writing proofs.
Guide to Proofs on Discrete Structures (Stanford CS103)
Short Stanford CS103 handout giving proof templates for injectivity (direct and contrapositive), non-injectivity, surjectivity and bijections, based on the first-order-logic definitions. It also covers defining functions and writing longer proofs with lemmas, with practice exercises.