__repr__ method 208, 371, 373, 631
+ operator 208, 365, 445, 478, 607, 611
2D vectors. See vectors
defining 3D object with vectors 114-116
orienting faces and shading 116-118
drawing transformed objects 124-126
inventing geometric transformations 131-133
rotating objects about an axis 129-131
translating in 4D world 196-199
3D vectors. See vectors
ABC (abstract base class) 211, 633
abstractions, building with functions 17
calculating activations of each subsequent layer based on activations in preceding layer 572
each activation in next layer as function of all of activations in input layer 570-571
return vector whose entries are activations of output layer 572
setting input layer activations to entries of input vector 570
proving projection preserves vector sums 182-183
converting from components to 57-59
converting to components 52-55
measuring with dot products 97-100
antiderivatives, integrals as 387-388
artificial neural networks 559
accelerating spaceship 343-344
adding velocities to asteroids 339
adding velocities to objects 339
keeping asteroids on screen 340-342
updating game engine to move asteroids 339-340
deciding whether laser hits an asteroid 270
average_flow_rate function 305-306
axn expression 382
calculating partial derivatives for last layer weights using chain rule 590-591
finding cost in terms of last layer weights 590
Cartesian coordinates 51-52, 54-55, 57, 68, 88, 129
components, of 2D vectors 35-37
constant velocity motion 338-342
adding velocities to objects 339
keeping objects on screen 340-342
updating game engine to move objects 339-340
CoordinateVector class 216-217
with logistic regression 526-558
exploring possible logistic functions 544-557
finding best logistic function 551-557
framing classification as regression problem 536-544
picturing decision boundary 532-535
testing classification functions 528-530
building random digit classifier 565-566
measuring performance of digit classifier 566
drawing better decision boundary 533
implementing classification function 534-535
derivative of a function at the point 318
of products and compositions 378-379
of transformed functions 375-376
finding with computer algebra system 355-356
derivative method for expressions 382-383
df/dx notation 412
between cross products 106-108
distinct_variables function 366
does_intersect function 263, 270-271
building projectile simulation with 426-427
implementing algorithm in Python 346-347
running with smaller time steps 348-353
Expression class 365, 367, 370, 373, 382
faces, of 3D objects, orienting 116-118
approximating change in volume 323-328
breaking up time into smaller intervals 324-325
for short time interval 323-324
picturing on flow rate graph 325-327
approximating instantaneous 315-322
currying and plotting function 320-321
finding slope of small secant lines 315-318
average_flow_rate function 305-306
negative rates of change 308-309
picturing with secant line 306-308
plotting average over time 310-314
finding average in different time intervals 310-311
plotting interval flow rates 311-313
Fourier series, decomposing sound waves into 465-466, 486-495
defining inner products for periodic functions 488-490
finding vector components with inner products 487-488
Fourier coefficients for other waveforms 492-494
Fourier coefficients for square wave 491-492
Fourier coefficients, writing function to find 490-491
functional programming paradigm 621
functional programming techniques 128
integrating symbolically 387-389
integrals as antiderivatives 387-388
viewing square and non-square matrices as 180-181
gcf (get current figure) method 628
calculating with backpropagation 588-592
calculating partial derivatives for last layer weights using chain rule 590-591
finding cost in terms of last layer weights 589-590
optimizing projectile range using gradient ascent 449-461
finding uphill direction with gradient 451-453
gradient of range function 450-451
implementing gradient ascent 453-457
plotting range vs. launch parameters 449-450
training neural networks using gradient descent 582-588
automatic training with scikit-learn 585-586
calculating gradients with backpropagation 584
framing training as minimization problem 582-584
identity transformation 150, 170
manipulating with vector operations 227-230
ImageVector class 228-229, 236, 254
defining for periodic functions 488-490
finding vector components with 487-488
choosing right formula for line 263-264
finding standard form equation for line 265-267
linear equations in matrix notation 267-268
solving linear equations with NumPy 268-270
inverse trigonometric function 58
linear equations, systems of 257
intersection points of lines 270
choosing right formula for line 263-264
finding standard form equation for line 265-267
linear equations in matrix notation 267-268
solving linear equations with NumPy 268-270
linear functions 163, 181, 244, 501
proving projection preserves scalar multiples 183-184
proving projection preserves vector sums 182-183
linear transformations 155, 163, 380
preserving vector arithmetic 138-140
representing with matrices 159-170
3D animation with matrix transformations 166-168
composing linear transformations by matrix multiplication 163-166
implementing matrix multiplication 166
multiplying matrices with vector 161, 163
writing vectors and linear transformations as matrices 159-160
LinearFunction class 244, 251-252
logistic regression 526, 540-558
exploring possible logistic functions 544-557
measuring quality of fit 546-547
parameterizing logistic functions 545-546
finding best logistic function 551-557
gradient descent in 3D 551-552
testing an understanding best logistic classifier 554-555
using gradient descent 552-553
framing classification as regression problem 536-544
picturing decision boundary 532-535
drawing better decision boundary 533-534
implementing classification function 534-535
testing classification functions 528-530
testing classification function 529-530
m/s/s (meters per second per second) 343
math, learning through software and code 1-17
abstractions, building with functions 17
interpreting matrices of different shapes 175-191
column vectors as matrices 176-178
determining which pairs of matrices can be multiplied 178-180
projection as linear maps 181-184
viewing square and non-square matrices as vector functions 180-181
linear equations in matrix notation 267-268
representing linear transformations with 159-170
3D animation with matrix transformations 166-168
composing linear transformations by matrix multiplication 163-166
implementing matrix multiplication 166
multiplying matrices with vector 161-163
writing vectors and linear transformations as matrices 159-160
translating vectors with 191-203
combining translation with other linear transformations 195-196
finding 3D matrix for 2D translation 194-195
making plane translations linear 191-194
translating 3D objects in 4D world 196-199
meters per second per second (m/s/s) 343
MLP (multilayer perceptron) 568
implementing MLP class 578-580
testing performance of 581-582
constant velocity motion 338-342
adding velocities to objects 339
updating game engine to move objects 339-340
implementing algorithm in Python 346-347
running with smaller time steps 348-353
move method 340-341, 344, 401, 404
multilayer perceptron. See MLP (multilayer perceptron)
composing linear transformations by 163-166
of 2D vectors by numbers 37-38
proving projection preserves scalar multiples 183-184
implementing MLP class 578-580
testing performance of MLP 581-582
calculating gradients with backpropagation 588-592
calculating partial derivatives for last layer weights using chain rule 590-591
finding cost in terms of last layer weights 589-590
classifying images of handwritten digits 561-568
building 64-dimensional image vectors 563-565
building random digit classifier 565-566
measuring performance of digit classifier 566
calculating activations 572, 576
organizing neurons and connections 568-569
training using gradient descent 582-588
automatic training with scikit-learn 585-586
calculating gradients with backpropagation 584
framing training as minimization problem 582-584
octahedrons 114-115, 118, 635-638
OOP (object-oriented programming) 206-634
inheritance and abstract classes 632-634
polar coordinates 51-52, 68, 129
PolygonModel class 259, 262, 270, 276, 340
building with Euler’s method 426-427
calculating optimal range 432-440
as function of launch angle 432-435
identifying maxima and minima 437-438
solving for maximum range 435-437
adding another dimension 441-442
modeling terrain around cannon 442-443
solving for range of projectile in 3D 443-446
optimizing using gradient ascent 449-461
finding uphill direction with gradient 451-453
gradient of range function 450-451
implementing gradient ascent 453-457
plotting range vs. launch parameters 449-450
exploring different launch angles 428-429
measuring properties of trajectory 427-428
Pythagorean theorem 36, 57, 86
building neural networks in 577-582
implementing MLP class 578-580
testing classification performance of MLP 581-582
checking for existing installation 595-596
downloading and installing Anaconda 596-597
object-oriented programming 634
inheritance and abstract classes 632-634
translating expression trees to 360-362
using in interactive mode 597-606
creating and running script file 598-600
using Jupyter notebooks 600-606
QuadraticFunction(Vector) class 252
as function of launch angle 432-435
identifying maxima and minima 437-438
solving for maximum range 435-437
optimizing using gradient ascent 449-461
finding uphill direction with gradient 451-453
gradient of range function 450-451
implementing gradient ascent 453-457
plotting range vs. launch parameters 449-450
approximating change in volume 323-328
breaking up time into smaller intervals 324-325
for short time interval 323-324
picturing on flow rate graph 325-327
approximating instantaneous flow rates 315-322
currying and plotting function 320-321
finding slope of small secant lines 315-318
calculating average flow rate 305-309
average_flow_rate function 305-306
negative rates of change 308-309
picturing with secant line 306-308
plotting average flow rate over time 310-314
finding average in different time intervals 310-311
plotting interval flow rates 311-313
plotting volume over time 328-335
definite and indefinite integrals 334-335
finding volume over time 328-329
improving approximation 332-333
picturing Riemann sums for volume function 329-331
Rectangle class 629-630, 632-634
REPL (read-evaluate-print loop) 597
RGB (red, green, and blue) 227
finding slope of small 315, 318
picturing average flow rate 306, 308
shading, of 3D objects 116-118
building familiar function with 483-486
building linear combination of 481-482
sampling and playing sound waves 475-476
combining sound waves 465-466, 478-486
adding sampled sound waves to build chords 478-479
building familiar function with sinusoids 483-486
building linear combination of sinusoids 481-482
picturing sum of two sound waves 479-481
decomposing sound waves into Fourier series 465-466, 486-495
defining inner products for periodic functions 488-490
finding vector components with inner products 487-488
Fourier coefficients for other waveforms 492-494
Fourier coefficients for square wave 491-492
Fourier coefficients, writing function to find 490-491
playing sound waves in Python 466, 471
turning sinusoidal wave into sound 471-477
changing frequency of sinusoid 473-475
making audio from sinusoidal functions 471-473
sampling and playing sound wave 475-476
evaluating expressions 366-369
finding all variables in expressions 365-366
of products and compositions 378-379
of transformed functions 375-376
with computer algebra system 355-356
integrating functions symbolically 387-389
integrals as antiderivatives 387-388
modeling algebraic expressions 358-365
breaking expressions into pieces 358-359
building expression trees 359-360
translating expression trees to Python 360-362
symbolic algebra in Python 356-358
taking derivatives automatically 381-386
derivative method for expressions 382-383
systems of linear equations 257
intersection points of lines 270
choosing right formula for line 263-264
finding standard form equation for line 265-267
linear equations in matrix notation 267-268
solving linear equations with NumPy 268-270
transformations 67-72, 121-157
linear transformations 138-155
preserving vector arithmetic 138-140
representing with matrices 159-170
composing vector transformations 126-129
drawing transformed objects 124-126
inventing geometric transformations 131-133
rotating objects about an axis 129-131
translating vectors with matrices
combining translation with other linear transformations 195-196
finding 3D matrix for 2D translation 194-195
making plane translations linear 191-194
translating 3D objects in 4D world 196-199
converting from angles to components 52-55
converting from components to angles 57-59
updating game engine to move objects 339
Vec2 class 207-208, 210-213, 215, 218, 251
Vector class 211-212, 214-215, 219, 221, 226, 228, 230, 234-235, 244, 367
vector operations, image manipulation with 227-230
vector spaces 206, 213, 219-237
enumerating all coodinate vector space 219-221
manipulating images with vector operations 227-230
treating functions as vectors 223-226
treating matrices as vectors 226-227
unit testing vector space classes 214-215
of vector space of functions 244-245
starting with single vector 240
column vectors as matrices 176-178
defining 3D objects with 114-116
multiplying matrices with 161-163
viewing square and non-square matrices as vector functions 180-181
approximating change in 323-328