Mathematica Article Index for
Mathematica
Articles about
Mathematica
Website Links For
Mathematica
 

Information About

Mathematica




name = Mathematica
  developer Wolfram Research
  operating System Cross-platform (list)
  genre Computer Algebra System
  license Proprietary
  website Mathematica homepage



This article is about computer software. For the policy research organization, please see Mathematica Policy Research, Inc.


Mathematica is a widely-used Computer Algebra System originally conceived by Stephen Wolfram , developed by a team of mathematicians and programmers that he assembled and led, and sold by his company Wolfram Research . Mathematica is also a powerful Programming Language emulating multiple paradigms on top of Term-rewriting .


OVERVIEW

]]
Wolfram and his team started to work on the program in 1986 and released the first version in 1988. The current version is 5.2 (released July 12, 2005). It is available on a wide variety of computer systems.

The Mathematica programming language is based on Term-rewriting and supports both Functional and Procedural Programming (though functional code is much more efficient in general). It is implemented in an object-oriented variant of C , but the bulk of the extensive Code Library is actually written in the Mathematica language that can be used to extend the system. Typically, new code is added in the form of Mathematica "packages", i.e., text files written in the Mathematica language.

In the Mathematica system, the core language is interpreted by a ''kernel'' that performs the actual computations. The results are usually communicated to one of several ''front ends''. Communication between the kernel and the front end (or any other client, like user-written programs) uses the ''MathLink protocol'', often over a network. It is possible for several front end processes to connect to the same kernel, and for one front end to be connected to several kernels.

Unlike some other Computer Algebra System s, for example Maxima or Maple , Mathematica tries to apply the currently stored transformation rules as long as possible, looking for a fixed point. For this to be meaningful, absence of side-effects is beneficial (though not enforced), hence the similarity to Functional Programming . Functions and code are first-class and not opaque. Scoping is dynamic, but there are also some constructs that try to simulate lexical scope (all of these can easily be broken).


HISTORY

Wolfram has released the following versions:
  • Mathematica 1.0 (1988)

  • Mathematica 1.2 (1989)

  • Mathematica 2.0 (1991)

  • Mathematica 2.1 (1992)

  • Mathematica 2.2 (1993)

  • Mathematica 3.0 (1996)

  • Mathematica 4.0 (1999)

  • Mathematica 4.1 (2000)

  • Mathematica 4.2 (2002)

  • Mathematica 5.0 (2003)

  • Mathematica 5.1 (2004)

  • Mathematica 5.2 (2005)



EXAMPLES

The following Mathematica sequence will find the Determinant of the 6×6 Matrix whose ''i'', ''j'''th entry contains ''ij'' with all zero entries replaced as 1.
In Det[Array[Times, {6, 6}, 0 /. 0 -> 1]
Out {Link without Title} = 0

So the determinant of such a matrix is 0.

The following numerically calculates the root of the equation ''e''''x'' = ''x''2 + 2, starting at the point ''x'' = -1.

In FindRoot[Exp[x == x^2 + 2, {x, -1}]
Out {Link without Title} = {x -> 1.3190736768573652}

See List Of Hello World Programs for the prototypical Hello World program.


Multiple paradigms, one language

Mathematica permits multiple Programming Paradigm atic approaches to programming. Consider a simple example: we want a table of values of gcd(''x'', ''y'') for 1 ≤ ''x'' ≤ 5, 1 ≤ ''y'' ≤ 5.

The most concise approach is to use one of the many specialized functions:

In Array[GCD, {5, 5}
Out {Link without Title} =

There are at least three other approaches to this:
In Table[GCD[x, y , {x, 1, 5}, {y, 1, 5}]
Out {Link without Title} =

An APL-style approach:
In Outer[GCD, Range[5 , Range[5]]
Out {Link without Title} =
Outer corresponds to the outer product operator, Range corresponds to the Iota Operator .

An iterative approach:
  • initialize as empty list, since we want a list in the end ---)

  • For[i = 1, i <= 5, i++,

l2 = {};
For[j = 1, j <= 5, j++,
l2 = Append GCD[i, j ]
];
  • append the sublist, that is, the row ---)

  • ]; l1

Out {Link without Title} =
Observe that this solution is considerably larger than the previous ones.


Common structures, common manipulations

One guiding principle in Mathematica is a unified structure behind almost all objects representable in Mathematica. For example, the expression x^4+1 if entered will be represented as if it were written:
In {Link without Title} := x^4 + 1
Out {Link without Title} = 1+x4

If the FullForm command is used on this expression however:
In FullForm[x^4 + 1
Out Plus[1, Power[x, 4 ]

Nearly all objects in Mathematica have the basic form ''head'' ''e''2, ''...'' (which may be displayed or entered in some other fashion). For example, the head of the above example is Plus, and symbols such as ''x'' have form Symbol["x"]. Lists have this structure too, where the head is List.

The principle permits ordinary expressions unrelated to lists to be operated on with list operators:
In Expand[(Cos[x + 2 Log[x^11])/13] 2, 1
Out {Link without Title} = 2/13
The reverse can also occur -- lists can be modified to behave like ordinary expressions:
In Map[Apply[Log, # &, ]
Out {Log[x /Log Log[x /Log Log[x /Log[4]}
where the Apply function changes the head of its second argument to that of the first.


FRONT ENDS

The default Mathematica front end features extensive layout and graphical capabilities, performs Prettyprint ing and offers a notebook metaphor - user input (both text and Mathematica input) as well as results sent by the kernel (including graphics and sound) are placed in a hierarchy of cells (as is the case for Maple ), which also allows for outlining and sectioning of a document. Starting with version 3.0 of the software, notebooks are represented as expressions that can be manipulated by the kernel, and the typesetting features of the front end were deemed sufficiently important to warrant the availability of a dedicated reader software for displaying Mathematica notebooks, the MathReader software that is not tied to a commercial license.

Several other front ends are also available, e.g., '' JMath '' or ''mash'', but the standard Mathematica front end is the most popular.


CONNECTIONS WITH OTHER APPLICATIONS

Communication with other applications occur through a protocol called ''MathLink''. It allows not only communication between the Mathematica kernel and front-end, but also provides a general interface between the kernel and arbitrary applications. Wolfram Research distributes freely a developer kit for linking applications written in the C Programming Language to the Mathematica kernel through ''MathLink''. Two other components of Mathematica, whose underlying protocol is ''MathLink'', allow developers to establish communication between the kernel and a Java or .NET program: ''J/Link'' and ''.NET/Link''.

Using ''J/Link'', a Java program can ask Mathematica to perform computations; also, a Mathematica program can load any Java Class , manipulate Java objects and perform method calls, making it possible, for instance, to build Java Graphical User Interface s from Mathematica. Similarly, a .NET software can invoke the kernel to perform calculations and send results back, and Mathematica developers can easily have access to .NET's functionality.


MATHEMATICA ON THE WEB

Wolfram Research also makes a program called webMathematica with which Web servers can add "interactive calculations and visualization to a website."

On Sloane's Online Encyclopedia Of Integer Sequences , Mathematica and MAPLE are the two most often used CASs for which commands are provided with which to calculate the sequences; both of them have their own database fields on the OEIS.


SEE ALSO



EXTERNAL LINKS