Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  The Teacher's Book /  Basic Calculations /  Numerical Calculations /

2.5 Getting Used to Mathematica

Important points to remember in Mathematica.

You have now had a first glimpse of Mathematica TE. If you have used other computer systems before, you will probably have noticed some similarities and some differences. Often you will find the differences the most difficult parts to remember. It may help you, however, to understand a little about why Mathematica TE is set up the way it is, and why such differences exist.
One important feature of Mathematica TE that differs from other computer languages, and from conventional mathematical notation, is that function arguments are enclosed in square brackets, not parentheses. Parentheses in Mathematica TE are reserved specifically for indicating grouping of terms. There is obviously a conceptual distinction between giving arguments to a function and grouping terms together; the fact that the same notation has often been used for both is largely a consequence of typography and of early computer keyboards. In Mathematica TE, the concepts are distinguished by different notation.
This distinction has several advantages. In parenthesis notation, it is not clear whether means c[1 + x] or c*(1 + x). Using square brackets for function arguments removes this ambiguity. It also allows multiplication to be indicated without an explicit * or other character. As a result, Mathematica TE can handle expressions like 2x and a x or a (1 + x), treating them just as in standard mathematical notation.
You will have seen that built-in Mathematica TE functions often have quite long names. You may wonder why, for example, the pseudorandom number function is called Random, rather than, say, Rand. The answer, which pervades much of the design of Mathematica TE, is consistency. There is a general convention in Mathematica TE that all function names are spelled out as full English words, unless there is a standard mathematical abbreviation for them. The great advantage of this scheme is that it is predictable. Once you know what a function does, you will usually be able to guess exactly what its name is. If the names were abbreviated, you would always have to remember which shortening of the standard English words was used.
Another feature of built-in Mathematica TE names is that they all start with capital letters. In later sections, you will see how to define variables and functions of your own. The capital letter convention makes it easy to distinguish built-in objects. If Mathematica TE used i to represent , then you would never be able to use i as the name of one of your variables. In addition, when you read programs written in Mathematica TE, the capitalization of built-in names makes them easier to pick out.