Download the Hacking Math Class book in PDF format!
Click the Button to Pay by Credit Card or Paypal.
21st Century Math Education
Hacking Math Class is the first book of its kind to combine computer programming with learning math. No previous programming experience is required. The book takes you through the basics of getting a computer to do what you want it to do. Then you learn how to apply those programming tools to learning math.
Years ago I taught math to a homeschooled young man who was a computer programming enthusiast. I made sure every homework assignment I gave him contained a computer programming challenge so he could dig deeper into the concepts he learned that week. I got bitten by the programming bug myself and I set out to apply it to every imaginable math topic. In a very short time, I had written Python programs for exploring math topics from Algebra and Geometry to Calculus and Statistics!
Now you can explore math topics like Algebra, Geometry, Trigonometry and Calculus using the Python programming language. You'll learn to create tools like graphers and solvers to help you learn about functions and fractals!
All the code necessary to create the graphics on this page, fractals, 3D models and more are in the book.
View the entire Algebra chapter by clicking this link:
Table of Contents
1. Introduction to Programming
- The Turtle Module
- Using the Turtle Module
- Using Loops
- Defining Functions
- Using Variables
- Loops and Printing
- While loops
- Conditionals and Input
- User Input
- The random module
- The Modulo Operator
- Solving Higher-Degree Equations
- Major Math Tool: Create Your Own Grapher
- Synthetic Division
- Exploring Prime Numbers
- Binary Numbers
- Finding intersections of lines
- Finding Area of a Triangle Using Heron’s Formula
- Finding Lines Through Points
- Perpendicular Bisector
- Distance from a point to a line
- Sines and Cosines
6. 3D Graphics
- The Solar System Model
7. Recursion and Fractals
- Fractal Trees
- Pythagorean Tree
- Koch Snowflake
- Sierpinski Triangle
- Entering Matrices as Lists
- Transforming Points using Matrices
- Multiplying Matrices
- Rotation matrices
10. Complex Numbers
- Polar Form
- DeMoivre’s Theorem
- Graphing Complex Multiplication
- Mandelbrot Set
- Permutations and Combinations
- Standard Deviation
- Newton’s Method
- Numerical Integration
- The Trapezoidal Method
- Differential Equations
- The Runge Kutta Method
Answers to Exercises
Can't Install Pi3D?
If you have a Windows computer and can't easily install Pi3D, never fear! You can still have fun making 3D Graphics using Visual Python. Just download this version of the 3D Graphics chapter and then install VPython on your computer:
If you're lucky enough to live in the San Francisco Bay area, you can sign up to attend my hands-on Math Through Technology Program!
What is Math Through Technology?
"Computer Science is the New Mathematics" - Christos H. Papadimitriou
Math Through Technology is a course intended to enable math students to explore math and science topics deeply by using Python programming.
It's not about avoiding math using calculators! It's about automating the boring stuff so you can get to the fun stuff, like Calculus.
It's like Minecraft, where you make wood tools, and using wood tools, you can mine stone to make stone tools, and so on. In computer programming you create functions you can use as tools to create more and more powerful tools.
21st Century Skills
It's still important to be able to think mathematically.
It's equally important to be able to solve problems using appropriate technology.
The Python Programming Language
Developed in the late 1990s by Guido van Rossum, Python has become one of the top 3 popular programming languages, with Java and C++. It's widely used in research and industry, and it has applications in everything from web pages (like this one!) to 3D graphics to databases, music and hardware.
While you're learning to solve equations, you'll also be learning marketable skills in a hugely popular programming language.
Learn more about Math Through Technology here!