Mathematica

From Academic Kids

Mathematica is a widely-used computer algebra system originally developed by Stephen Wolfram and sold by his company Wolfram Research. Mathematica is also a powerful programming language emulating multiple paradigms on top of term-rewriting.

Contents

Overview

Wolfram started to work on the program in 1986 and released the first version in 1988. The current version is 5.1 (released in Nov 2004). 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 frontends. Communication between the kernel and the frontend (or any other client, like user-written programs) uses the MathLink protocol, often over a network. It is possible for several frontend processes to connect to the same kernel, and for one frontend to be connected to several kernels.

Unlike some other computer algebra systems like, e.g., 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).

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[1]:= Det@ReplaceAll[Table[i j, {i,0,5}, {j,0,5}],{0->1}]
 Out[1]:= 0

So the determinant of such a matrix is 0.

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

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

See Hello World for the prototypical Hello World program.

Front ends

The default Mathematica frontend features extensive layout and graphical capabilities, performs prettyprinting 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 frontend 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 frontends are also available, e.g., JMath or mash, but the standard Mathematica frontend is the most popular.

Connections with other applications

The MathLink protocol allows not only communication between the Mathematica kernel and front-end, but also 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, as well as JLink, a similar, easier to use system for the Java programming language. Using JLink, 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 interfaces from Mathematica.


See also

External links

de:Mathematica fr:Mathematica lt:Mathematica pl:Mathematica pt:Mathematica zh-cn:Mathematica

Navigation

Academic Kids Menu

  • Art and Cultures
    • Art (http://www.academickids.com/encyclopedia/index.php/Art)
    • Architecture (http://www.academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (http://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (http://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools