Wednesday, March 29, 2017

Don’t Skip the Code

By Nathan Carter

I’ll just say it right out. You should learn to program.

Like, really learn it. At least a computer science minor, maybe more.

You’ve probably heard “coding is the new literacy” a thousand times. I’m not going to say that. My reason is different.

Are you expecting to hear about marketability and median starting salary for graduates who combine math and computer science? Sure, data science is hot, and you can make good money (http://bit.ly/RiseOfDataSci). But that argument is convincing only if making money is your goal. “I like topology!” you say. “Keep your stupid money!” Don’t worry—I’m not going to talk about your marketability.

So what is my reason? Is it those mathematicians who leverage computers in their research? The Borwein brothers are well known for their contributions to number theory from a computational approach. William Stein is at least as well known for creating the mathematical software package Sage as for his number theoretic uses of it. The four-color theorem was proven by a computer . . . sort of.

You’re getting warmer. After all, the first research team I joined after graduate school had me writing R code to analyze graphs. But no, that wasn’t my argument either; not every area of mathematical research needs computers.

Nor was I planning to use a close cousin of that argument, for educators. Programming gives math teachers the ability to create great interactive experiences like those on GeoGebra.org, the Wolfram Demonstrations Project, and ShinyApps.io. Great resources, but they’re not my reason why you should learn to program.

Give up yet? Okay, I’ll tell you.

You should learn to program because mathematics and computer science have an amazing synergy that will open up your brain.

No, not like head trauma. Like enlightenment.

Both mathematical language and programming languages are ways of making ideas precise. They reinforce one another, like weight training and sports. To learn to program well (not just quick and dirty coding but real programming) requires pervasive organization in your thinking. That organization transfers to how you think and communicate about everything, especially precise things like mathematics.

Heck, programming requires even more organization and precision than mathematics does! I’ll back that up with a quote from Deb Roy, a roboticist at MIT, who said, “To understand how something works, you need to build it.” I can’t tell you how many times I’ve found that to be true.

I didn’t understand the change of basis matrices in an abstract algebra course until I needed them in a C++ library I was writing for computer graphics. My computer has been more exacting on my handling of edge cases than any journal referee. Just this morning I learned that I didn’t fully understand a graph algorithm when I tried to implement it in a new context. In each case, my understanding had to improve because I wasn’t just doing math, but building it. There’s a stereotype that the hardcore geeks skip computer science to get to math. Don’t believe stereotypes.

I promised not to call coding the new literacy. It’s a common phrase, but I prefer the idea that modeling is actually the new literacy (http://bit.ly/NewLit).

Don’t run away, pure mathematicians! Yes, modeling happens in stats and applied math. But any time we turn ideas into a precise formulation we can explore, we’re modeling. Taking an idea you have in set theory, formulating it as a new axiom, and exploring its consequences with theorems is modeling too.

Mathematicians and computer scientists both model for a living. (Ha.) Learning to program will expand the ways in which your brain does modeling. That will make you better at it, in code and in math. That’s my real argument. You get a more awesome brain. It’s probably not too late to change your schedule for next semester.

Nathan Carter programs and does math. He teaches at Bentley University and has written two books for the MAA, Visual Group Theory (2009) and Introduction to the Mathematics of Computer Graphics (2016).

Friday, February 3, 2017

The Gods Have Descended

By Marc Chamberland

Marc Chamberland
Some of the most deeply felt moments in life concern our connection to beauty— heart-stirring music, a baby’s laugh, a magnificent sunset. This same wonder applies to scenarios that would more often be described as technical rather than beautiful: the stunning precision of a dance troupe, a clever chess maneuver, a climber’s brilliant combination of moves on a rock face. What makes this techni- cal beauty so appealing? Perhaps it’s the uncom- mon mastery of a skill or the element of surprise. Beyond our analysis, however, these experiences capture our imagination and inspire our creative spirits.

But why do we seldom hear such stories connected to math? Defenders of mathematics can argue fervently about the mesmerizing beauty of their discipline, but it seems that their epiphanies are hidden and rarely celebrated. The mathematical community—indeed, the general public—could benefit from our tales of math- ematical allure. So, it’s time that I offer one of my own stories.

A Mysterious Series

In my first semester as an undergraduate at the University of Waterloo, Canada, I took Advanced Honours Algebra from Peter Hoffman. His tall, wiry frame, bulbous eyes, and 1970s shaggy hair came alive as he danced across the lecture platform. The University of Waterloo in Canada is a magnet for mathematical aspirants, so this 60-strong class was packed with some very bright students. One day Hoffman scribbled the following formula on the board:

“We’ve all seen this formula before, right?” he queried.

The only infinite series I had previously encountered was also the most accessible one: the geometric series. Although Hoffman’s equation is a standard result taught to calculus students, it was new to me. And it left me in awe. How could adding infinitely many polynomials—a mess in my mind—equal such a concise and elementary transcendental function? And where did the factorials come from? Aren’t those related to counting problems? My next question left me even more perplexed: How could somebody prove that this equation was true? To claim that such a formula was legitimate suggested madness, but to have a proof seemed divine.

I found all this so astonishing that a biblical phrase came to mind. The response of the people to seeing the apostle Paul perform a miracle in Lystra was my thought at seeing the new formula: “The gods have descended among us in the form of men.”

Many people, when overwhelmed by a stunning or surprising occurrence, experience a momentary shut- down of their chattering minds. It’s as if their brains need all available resources to process the experience. My reaction was a spontaneous response, an uncon- scious attempt to make sense of this inexplicably beautiful formula. Today, I routinely teach the mortal underpinnings of Hoffman’s formula, but it has never lost its wonder.

Unfortunately, mathematics is often taught as a col- lection of symbol-manipulating rules that are neither inspiring nor obviously applicable. Any good teacher knows that she will win over more hearts—and ac- companying good will—if she can show the wonder of her subject. Mathematics has much to teach students concerning beauty, usefulness, and connections to other disciplines.

Even if my students do not go on to do something groundbreaking with the math they learn, I hope that most of them will grow in their respect for, and even be charmed by, mathematical ideas. And if they are ever so awestruck, so captivated, so overwhelmed that their response to a new idea is something like “the gods have descended,” then I’ve succeeded in showing them that soul-stirring beauty can be found in mathematics.

Marc Chamberland is a professor of mathematics at Grinnell College and creator of the YouTube channel Tipping Point Math.