The Background and Vision of Mathematica

Opening keynote of the Wolfram Mathematica Virtual Conference 2011, September 26–27.

Hi. I’m pleased to be with you. I’ve been asked to talk a bit about the background and vision of Mathematica.

You know, this month it’s exactly 25 years since I started building Mathematica. It’s been really exciting seeing Mathematica grow and prosper over the years. But I have to say that in just the last few years, something truly remarkable seems to have been happening. It feels like Mathematica is really coming of age. It’s in just the right place at the right time. And it’s making possible some fundamentally new and profoundly powerful things. Like Wolfram|Alpha, and CDF, and yet other things that we’ll have coming over the next year.

But let me start off at the beginning. How did Mathematica come to be in the first place? Here’s the personal story.

I started out—in my teens—as a physicist. And doing theoretical physics requires doing lots of mathematical calculation. And I figured: these calculations are kind of mechanical. Why can’t I just get a machine to do them?

Well, that was in the mid 1970s. And at the time there were a number of research systems for doing algebra and things by computer. And I started using them—and managed to do some pretty interesting physics with them. But it didn’t take long for me outgrow the systems that existed.

So late in 1979 I decided that the only way I was going to have the kind of system I wanted was to build it myself. So I did. And pretty soon that system became the first commercial computer algebra system. But after a few years, I wanted much more.

I’d been doing a lot of basic science. Developing the foundations for what became known as “complexity theory”. And doing a lot of things that were really only made possible by computers. But you know, it was kind of a mess. I had my nice computer algebra system. And I had programming languages. And graphics systems. And numerical subroutine libraries. And typesetting systems. And I realized that actually I was probably spending most of my time just gluing these things together. And that got me to thinking: perhaps I should just build a single system, once and for all, that can do all the computational stuff I’ll ever want to do.

I thought about it for a while… and then, exactly 25 years ago this month, I decided that, yes, I should do this.

And I started building Mathematica.

Right from the beginning I had several principles. I suppose the first was very personal: I wanted Mathematica to be the only computational system I’d ever have to use in my life. So I wanted it to cover everything I’d ever want to do: and to have a structure that was strong enough to extend as far as I wanted in any direction. I knew Mathematica would be a big system, and would keep growing.

And from the beginning I put incredible effort into making sure that it was coherent, and unified. And would always remain so. I wanted all the pieces of the system to fit perfectly together. So that if you were using one part of the system, you could immediately pull in any other part, you’d immediately know how to use it, and it would just fit seamlessly in.

And then—another principle—I wanted the system to be as automated as possible. I mean, the whole point of using a computer is to get it to do work for you. So the concept was that you should just tell Mathematica what you wanted to do, and it should figure out how to do it. If you were an expert, then you set all sorts of knobs and switches. But most of the time, you’d just let Mathematica figure out underneath the best algorithms for things, or whatever. Completely automatically. So that you as a human could get on with thinking about what you wanted to do, not how the computer was going to do it.

Well, so, those are the principles. But how should the system actually work? There’s a big idea there: it’s symbolic programming. Actually, when I started working on the forerunner of Mathematica 32 years ago, I guess I was a died-in-the-wool, if young, basic scientist. And so I figured that to make a system for doing computation, I had better understand at the most fundamental possible level what computation really is. And how it should be represented.

And so I went back to the foundations, and realized that there is a very clean way to do that. The key idea is that everything can be represented as a symbolic expression. Whether it’s a string, an array, a formula, a graphic, a program, a document, a user interface. Whatever. And because everything is represented in a uniform way, there’s a uniform set of operations that can be performed on it. And that’s in effect how this giant system that is Mathematica can fit together so well, and work in such a coherent way. It’s funny. In a sense symbolic programming is the secret that makes Mathematica possible. And when you start using Mathematica it’s something that’s just there, always providing a framework for what’s going on.

But I guess getting symbolic programming really to work—in the way it does in Mathematica—is hard. It needs a big technology stack. Which is why, even after all these years, serious symbolic programming is still pretty much a unique feature of Mathematica.

OK. So let’s take a little look at Mathematica. There are many ways to use Mathematica. But here’s one. You just type in a question, and it prints back the result.

1000!

1000!

Let’s ask to plot a graph.

Plot[Sin[x] + Sin[10 x] , {x, 0, 20}]

Graph of Plot[Sin[x]+Sin[10 x], {x, 0, 20}]

That was easy. OK. Now let’s say we want to make that dynamic. Well, that’s easy too. We just add a parameter, and tell Mathematica we want to Manipulate this as a function of that parameter.

Manipulate[Plot[Sin[x] + a Sin[10 x], {x, 0, 20}], {a, 0, 1}]

Actually, you can manipulate anything. Like, let’s manipulate a piece of algebra.

Manipulate[Factor[x^n - 1], {n, 10, 100, 1}]

And of course because this is Mathematica that just works.

Well, OK. Let’s make some data. We could import the data from anywhere too. Or connect to an external device or program or whatever. But here, let’s just make some data.

Table[i → Mod[i^2, 100], {i, 100}]

Table showing i → Mod[i^2, 100], {i, 100}]

Well, OK, now let’s say we want to interpret this as a network.

GraphPlot[%]

Graph showing Table[i → Mod[i^2, 100], {i, 100}]

We can ask Mathematica to plot that. And it’ll automatically figure out a good layout. What if we want a bunch of these? We can just make a table.

Table[GraphPlot[Table[i → Mod[i^2, n], {i, n}]], {n, 50, 60}]

Table with the output of Table[GraphPlot[Table[i → Mod[i^2, n], {i, n}]], {n, 50, 60}]

We could put it in tabs.

TabView[Table[ GraphPlot[Table[i → Mod[i^2, n], {i, n}]], {n, 50, 60}]]

You know: Mathematica can deal with pretty much any kind of data. Like, let’s get a picture. Say we just drag it from the web. Now because this is Mathematica we can just immediately use that picture as an argument of a function.

EdgeDetect

Image showing output of EdgeDetect

Maybe I can break that image up into pieces. And so on. The whole symbolic structure of Mathematica means that we can manipulate an image just like we can manipulate numbers, or text, or formulas, or whatever.

ImagePartition[%,20]

Image broken up by ImagePartition

Let me just give you a tiny taste of that whole symbolic language thing.

f[x]

f[x]

That’s a symbolic expression.

f[x, y]

f[x, y]

What about this?

x + y

x + y

Turns out to be a symbolic expression too.

FullForm[%]

Plus[x, y]

Or this.

x^2 + y//FullForm

Plus[Power[x, 2], y]

And there are all sorts of very powerful functions that construct and manipulate symbolic expressions, in very general ways.

Like here’s one.

NestList[f, x, 5]

{x, f[x], f[f[x]], f[f[f[x]]], f[f[f[f[x]]]], f[f[f[f[f[x]]]]]}

Now you can do all kinds of things with this. Here’s making nested frames.

NestList[Framed, x, 5]

Using NestList to show 5 frames

Here’s like building a toy user interface programmatically. And of course you can do very real versions of that very easily.

NestList[TabView[{#, #}] & ,x ,5]

TabView of NestList

OK. But perhaps I should go back to the story of Mathematica. So there it was. June 23, 1988. Mathematica version 1 was released. You know, back then, even people like scientists and engineers almost never did their own computing. There were specialized “computer people” who did that. Because computing was sort of messy, and time consuming. Well, Mathematica has grown immensely over the years. But even Mathematica 1 already had the basic feel of what we now know and love as Mathematica.

And back in 1988 I think for most people it was something pretty spectacular. It transformed computing into something that you could actually do. Without being a special highly trained “computer person”. The first big set of people who rushed in to use Mathematica were around mathematics and the physical sciences. Though even from the very beginning there were people from a huge range of fields—sometimes quite unexpected ones.

And over the years a really really impressive set of things has happened in the world as a result of Mathematica. For me it’s extremely satisfying. Feeling that the work we’ve done has contributed to so many discoveries, so many inventions, so much stuff getting built. So many people telling me that they couldn’t have got their education, that they couldn’t have done their projects, that they couldn’t have launched their companies—without Mathematica.

You know, at the beginning, it was a challenging thing explaining what Mathematica is. It’s a system for doing everything computational you’ll ever want. It’s a language for representing everything computational. It’s something that there aren’t really words to describe.

Well, at the beginning, the obvious “killer app” for Mathematica was math. And so we decided—actually as it happens, it was Steve Jobs who really encouraged me in this direction—to call MathematicaMathematica”. And to say that it was “a system for doing mathematics by computer”. Well, people got that idea. And started using it, and doing wonderful things with it.

Now, of course, there was a lot more to Mathematica than math—even in the broadest sense that the term “math” gets used. And indeed, over the years, even though Mathematica is incredibly widely used in math, that represents a smaller and smaller fraction of all Mathematica usage.

You know, after 25 years, you might think that any software system would kind of have run its course. But not Mathematica. Instead, if you plot the growth of functionality in Mathematica, it’s actually been speeding up. I always find it neat. Occasionally I’ll unearth a Mathematica program that I wrote 20+ years ago for Mathematica version 1. And I’ll start up in Mathematica 8—and it’ll just run. And what’s more, the program will look completely modern. It’s just pure timeless symbolic programming. That’s what one gets for having set up the right foundations. That one can just go on and on building more and more on top of them.

Over the years, we’ve built up a large and impressive team working on Mathematica. And we’ve invented an amazing amount of technology, an amazing number of algorithms, and so on. But one thing I’ve personally always been very involved in is figuring out the overall design of the system. How all the functions in it should look to the user; how they should fit together.

It’s very hard work. But it’s a fascinating process. Really understanding at a deep level all these different areas, to be able to create the right structures, the right functions, for them. You know, the way I see the job of the language designer is this: there are all these computations out there that people might want to do. You have to understand this whole space, and see what the right primitives are from which these computations can conveniently be built up. And then you have to give names to those primitives, and implement them. And those become the functions and other constructs in the language.

You know, in a sense it’s a big responsibility being a language designer. Because when people learn your language well, they’re not just using it—they’re actually thinking in it. And in Mathematica it’s really neat to see people who know the language well. It’s so incredibly fast to implement very impressive things.

Now, of course, in Mathematica, there’s sort of an unfair advantage. In addition to the idea of symbolic programming—which is what lets Mathematica be such a high-level language—there’s another point: Mathematica has an incredible amount of algorithmic knowledge built in. One of our goals with Mathematica has been to build in essentially every general algorithm one can imagine. In every area. Numerical computation. Image processing. Data analysis. Graph theory. Whatever. And that means that right there in the language, you can call on any of these things. It’s just “free” inside your program to solve a traveling salesman problem, or to do elaborate image processing, or to diagonalize a giant sparse matrix.

And all this stuff is completely integrated in a coherent way into the core system. You’re not chasing libraries, buying random toolboxes, and trying to glue all sorts of bits and pieces together, and hoping they’ll work. You have all this functionality—all these algorithms—built right in to Mathematica, all arranged to be consistent and coherent.

You know, it’s interesting. When we attack a new area, it’s an interesting process. We’re always building for the long term. Implementing in a very clean way everything that can reasonably be implemented. Usually we have to invent a lot of stuff. We figure out how to represent things in the most clean and coherent way. And that’ll usually reveal holes where we have to invent completely new algorithms. And then we’ll start automating things—and actually some of our most complex algorithms are ones we invent to make all that automation work smoothly and reliably.

When you use Mathematica, one of the great things is how scalable it is. I mean, you can start off just doing a line at a time, calculating and exploring something. But then you can start building little functions. Maybe making little user interfaces. Maybe running stuff in parallel, or on GPUs, or whatever. But you can just go on building. Serious large-scale Mathematica programmers tend to switch at some point to the Wolfram Workbench IDE. But the whole Mathematica system just scales right on up.

And Wolfram|Alpha, for example, is now a pretty big program, by anyone’s standards: 15 million lines, of pure Mathematica code. Running in production on zillions of parallel machines. And you know, Mathematica itself is now mostly written in the Mathematica language.

And it’s been pretty exciting, particularly these last few years. Watching how much the rate of Mathematica development has been accelerating. We’ve got these principles—of coherence and automation. And we’ve invested a huge amount in them. And in addition to benefiting all our users over all these years, they’re also now paying this incredible dividend for us. Because they’re letting us build Mathematica faster and faster.

Like in Mathematica 8 we added symbolic probability computations. And I think we did something really nice there. But what made it possible is that we could take for granted everything else in Mathematica. The calculus. The numerics. The computational geometry. Whatever. We can build faster and faster because we’re constantly creating bigger and bigger building blocks. Which all fit together.

So that now Mathematica has by a huge margin the world’s largest collection of built-in algorithms, all integrated together, and being used every day by a huge collection of people. At the front lines of R&D in essentially every industry. In every technical field. In essentially every Fortune 500 company. In every major university around the world. And in lots of unexpected places.

You know, it’s been interesting. With its foundation in symbolic programming, and its core principles, Mathematica defines a whole way to think about computing. And as the years have gone by, we’ve gradually understood more and more just what the implications of that are, and what can be built on those foundations. And occasionally there’ve been some big jumps. Like in the mid 1990s, when we first introduced symbolic documents. Or in 2007, when we introduced dynamic interactivity, and functions like Manipulate—that provided a whole new paradigm for interacting with Mathematica. Being able not just to get static results. But instantly to use the symbolic power of Mathematica to generate dynamic programs as results.

You know, as I mentioned, I personally had sort of a selfish reason for wanting to build Mathematica in the first place: I wanted to use it. And actually, starting quite soon after Mathematica was first released, I was able to do that, in a big way. I kind of viewed Mathematica as a kind of computational analog of a telescope. But instead of peering into the astronomical universe, I was looking into the computational universe. Doing experiments with Mathematica to find out how programs out there in the computational universe behave.

Well, I discovered some really really interesting and surprising things. That I wrote a big book called A New Kind of Science about. And in addition to what that book had to say about science, it also suggested new ways to create algorithms, and new ways to think about computation.

Well, for a start, this has given us new ways to develop Mathematica. But actually, it’s also given us something else. Because it gave me kind of a paradigmatic basis for Wolfram|Alpha. I had long thought about trying to take the world’s knowledge and make it computable. But a few years ago, building on ideas from my science, and the practical capabilities of Mathematica, I set about building what has become Wolfram|Alpha. For those of you who haven’t seen it, it lives on the web, and in apps, and embedded in an increasing range of places.

Here it is on the web. Let’s start with something easy.

2 + 2

OK. That’s good.

Well, OK. Wolfram|Alpha has tons of knowledge about the world.

GDP France

We can ask it questions just in natural language.

What is the GDP France/Germany

It’s got all kinds of data on all kinds of things.

banana consumption in Spain

Or here, let’s try something educational.

Boston school district

Or let’s compare two names.

Robert vs. William

And then it can take the birth curves, convolve with mortality curves, and so on.

flights overhead

It’s got lots of real-time data coming in. So let’s ask it about planes near us. Maybe we can click one, and see all sorts of details about it.

Or let’s enter a genome sequence, and Wolfram|Alpha will figure out where that matches on the human genome.

AGGTTTAATTGTTAAA

Or let’s do a more elaborate physics calculation. Right here.

55 MeV electron in lead

The basic idea is always the same. You type in a query—just in ordinary natural language—and Wolfram|Alpha will use all the knowledge it has built in to compute an answer to your query. It’s an incredibly complicated system. With data and models and algorithms from thousands of different domains. And a way—based on a bunch of pretty major breakthroughs—for understanding the free-form input people give. And underneath, as I said before, it’s all Mathematica—a big Mathematica system.

There’s a lot of exciting stuff going on with Wolfram|Alpha. But let me show you one thing. How Wolfram|Alpha gets plugged in to Mathematica. Normally Mathematica is a precise language that lets you build up arbitrarily large programs in a very careful way. But what if you put Wolfram|Alpha into it?

Here’s how it works. Starting last year with Mathematica 8, you can give free-form input to Mathematica.

polar plot sin(3 theta)

Graph showing polar plot sin(3 theta)

So you can just ask for a plot like this. And Wolfram|Alpha can translate that kind of vague input into precise Mathematica.

Let’s ask to add a frame. Again, we’ll get Mathematica code synthesized right from our free-form input. Or now let’s do image processing. You can do data too.

add a purple frame

polar plot sin(3 theta) with purple frame

blur the image

blurred image of polar plot sin(3 theta)

Or let’s say we ask for flags.

countries in South America

Argentina, Bolivia, Brazil, Chile, Colombia, Ecuador, FalklandIslands, FrenchGuiana, Guyana, Paraguay, Peru, Suriname, Uruguay, Venezuela

flags of countries in South America

Flags of countries in South America

Now we can do edge detection.

EdgeDetect/@%

Flags of South America after EdgeDetect

It’s great when you know how to write Mathematica, in the full language of Mathematica. But this free-form input means you don’t have to know that language. You can just get started using Mathematica knowing only plain English. It’s sort of another kind of automation: you just say what you want, and Mathematica figures out how to do it.

You know, with Mathematica, and now Wolfram|Alpha, we have a pretty amazing stack of technology. And right now we’re just having a fantastic time understanding the implications of it all. And building some pretty remarkable new products.

You might have seen the 25 mobile apps that we’ve brought out. Or the bestselling ebooks that our spinoff company Touch Press has created using a Mathematica production pipeline. And in the coming months you’ll be seeing some really remarkable products emerging, that build on both Mathematica and Wolfram|Alpha. Products that I’m not embarrassed one bit have taken 25 years of technology development to produce.

By the way, I should mention a major product and direction that just came out a couple of months ago: CDF—the Computable Document Format. It’s yet another of those ideas that’s made possible by the symbolic nature of Mathematica: computable documents. It used to be the case that to make serious interactive content, you really didn’t have any choice but to do all sorts of messy interface programming. But in Mathematica, we’ve always had what we call the notebook interface—in which everything you do is in a document, that, like everything in Mathematica, can be manipulated symbolically.

And using dynamic interactivity in Mathematica, we launched what we call the Wolfram Demonstrations Project. To which more than 7,000 Demonstrations have been contributed. All underneath written in Mathematica. And all acting like little apps embedded in documents. The Demonstrations Project is a great source of example code—supplementing the couple of hundred thousand examples in the Mathematica documentation system.

But now what CDF does is to provide a way to package interactive computable documents. So they can occur anywhere. In a web page. Wherever. You can use them to make a new generation of textbook and other educational material: a lot of work is going on in that. And you can use them to make interactive reports. Which I have to say are pretty spectacular.

I mean, I insisted a while ago that all the reports inside our company get generated as CDFs, and it’s really amazing how much more powerful it is to be able to interact dynamically with a report, and recompute what you want.

And of course there’s more unification. Because now Wolfram|Alpha can generate CDF. So in effect one’s going straight from free-form natural language to interactive programs. Just a typical example of what’s possible with all this technology that we have, that fits together so well.

I have to say that even though I originally created Mathematica 25 years ago, I’m just constantly amazed at all the things it makes possible, here and now. For me, and all of us at Wolfram Research, Mathematica has become not just a software system, but a whole way of thinking about computing. You know, outside the company, I often run in to people who tell me that they’re doing this or that project. And I say, “Well, you should be using Mathematica for that.” They say, “Really?” Then they actually try it. And I hear back from them “Wow. I had no idea that could work. I had no idea anything could do that.”

And, to me as a system designer, often what happened was pretty satisfying: they just tried the obvious thing—the most clean and direct way of attacking their project in Mathematica. And it just worked. And they were able to go all the way from beginning to end just using Mathematica.

Well, I think I should wrap up here. I hope through today you’ll have a chance to learn a little more about Mathematica. We’re very proud of Mathematica and of what so many people have been able to do with Mathematica over the years. Though you haven’t seen anything yet!

Thanks.

Posted in: Mathematica

4 comments

  1. You definitely provided an exellent and remarkable job. That is obvious. A kind of revolution. No doubts, all scientists would agree with that…

    While we, teachers, have to deal with the consequences of your discoveries. How should we survive and continue teaching kids to study elementary math, as well as analysis… How can we explain that these are a really advanced and mind developing things to know? Kids will know (or already know) on the Mathematica or Wolfram|Alpha abilities. They have mini computers in their mobile phones… The programms grows faster then human mind and become more and more clever…

    Though, we all remember the calculator story. It is not necessary now to know the multiplication table… So why should XXI century kids study on how to take simple integrals if all these integrals and even differential equations, and much much more can be taking by just typing a line and clicking in free-for-all W|A?…

    This is a question we try to think since 2009. Last years our eight grade pupil checked that Russian graduate exam for a middle school (K-12 level or so) can be solved at least to a “passed” mark by W|A. Maybe that is nothing. However, there is a probability people would decide not to study whatever a computer can do more effectively. The example which we have in mind: a chess world champion name is now shoud be always added “among people”. Just look what happened with the chess popularity recent years… The similar story can easily be repeated with math skill… Then…. who will develop Mathematica or W|A in the nearest future? People who do not have an internet?

  2. Gorod really made that point I’ve thought about. However, I am not an educator of math, for now at least. I do calculate things on physics and I do find this Mathematica is gorgeous comparing to C codes well-written. In fact, I am transforming a code of C written by senior to complete my job now simply because I cannot tolerate running her code again and again just changing some parameters. I don’t wanna be a machine! I should mathematica is basically far more close to math than C or Matlab, though somehow more popular in my location.

    M.

  3. I am the student of Mathematics and I am proud that I am the user of Mathematica. It is the great tool for Mathematician.

  4. Well,I’m a brazilian student and I’m feeling so wondered with that amazing tool :Mathematica.
    Wolfram is a genius system designer! Of course he is working out for show to the world many other incredible stuff.