Your First Wolfram Language Calculations

Type 2+2 and then press Shift+MacOSXReturnEnter (hold down the Shift key and press MacOSXReturnEnter) to tell the Wolfram Language to evaluate your input.

Note that labels are added automatically, and output is placed below the input:

2+2

Your first calculation will take longer than subsequent calculations because the Wolfram Language kernel has to start up.

You can use the Wolfram Language just like a calculator. Type the input 9.7^200 and press Shift+MacOSXReturnEnter. Here is the result.

A basic numerical calculation:

9.7^200

Here is an example from algebra. Type the input (RefLink[Factor, paclet:ref/Factor])[x^25-1] and note that as you type, the first bracket after the function name (RefLink[Factor, paclet:ref/Factor]) has a special color until the closing bracket is typed.

A basic algebraic calculation:

Factor[x^25-1]

You can use Greek letters or letters from other alphabets as variables:

Factor[α^21-1]

You can recall your most recent input (or output) in your next evaluation by pressing MacOSXCmdCtrl+L (or Shift+MacOSXCmdCtrl+L).

The Wolfram Language uses syntax coloring to help you compose expressions that are complicated. As part of that, function names and variables that are known to the Wolfram Language kernel are colored black. New symbol names are by default colored blue, but turn black after being evaluated for the first time.

You can configure the syntax coloring system using the Syntax Coloring dialog box. To open the dialog box, choose MacOSXMathematicaEditEdit ▶ (MenuGrayLink[Preferences, paclet:ref/menuitem/Preferences]), click the Appearance tab, and then the Syntax Coloring tab.

Here are some more examples.

(RefLink[Integrate, paclet:ref/Integrate]) is just one of over a thousand built-in Wolfram Language functions.

Note that the variable of integration is specially colored in the input:

Integrate[1/(x^3-1),x]

(RefLink[Plot3D, paclet:ref/Plot3D]) produces a three-dimensional plot. The graphic appears directly in your notebook, and can be interactively rotated and zoomed in or out.

Note that the plotting variables are also specially colored:

Plot3D[Sin[y+Sin[3x]],{x,-3,3},{y,-3,3}]

You can get instant information about a built-in function. Type (RefLink[?, paclet:ref/Information]), the function name, and then press Shift+MacOSXReturnEnter.

In a notebook interface, (RefLink[?, paclet:ref/Information])function also gives a link to the documentation for function:

?Integrate

To complete a partially typed command name, press MacOSXCmdCtrl+K. This is equivalent to (MenuGrayLink[Edit, paclet:guide/EditMenu]) ▶ (MenuGrayLink[Complete Selection, paclet:ref/menuitem/CompleteSelection]). To see a function template for a given function, press Shift+MacOSXCmdCtrl+K. This is equivalent to (MenuGrayLink[Edit, paclet:guide/EditMenu]) ▶ (MenuGrayLink[Make Template, paclet:ref/menuitem/MakeTemplate]).

To abort a calculation, press MacOSXCmdWindowsAltMod1+. More options for controlling evaluation can be found under the (MenuGrayLink[Evaluation, paclet:guide/EvaluationMenu]) menu.

Some Wolfram Language Conventions

Here are some basic things to remember when working with the Wolfram Language: