Introduction to the Wolfram Language

The Wolfram Language is a general way to express computations and data. You do not compile Wolfram Language code like C or Rust. Instead, Wolfram code is executed by a kernel. There are different ways to run Wolfram code: Mathematica, Wolfram|One, Wolfram Engine, etc. But they are all just different layers between your code and the Wolfram kernel.
A circular image with the head of a white wolf and a red sunset.

Key Things to Know

  • Expressions

    Everything in the Wolfram Language is an expression. These are the building blocks for all of your code. An expression can be a command like Integrate or a way to store an object like Circle.

  • Kernel

    The Wolfram kernel evaluates Wolfram Language code. There are thousands of built-in Wolfram commands you can use, but you're also able to define your own.

  • Documentation

    The online reference for the Wolfram Language is extraordinary. Some of the best documentation you will find for any language or program. Bookmark it and use it!

Examples

Wolfram Language code

Because of the powerful built-in functions, you can do a lot with only a single line of code. Here is how you would compute the sum of the first 100 prime numbers:

Sum[Prime[n], {n,1,100}]

Here is how you would generate 2000 numbers from the standard normal distribution:

RandomVariate[NormalDistribution[0,1], 2000]
A white wolf standing in a red room covered in computer circuits

FAQ - The Wolfram Language

  • Who created the Wolfram Language?

    The Wolfram Language, created by and named after Stephen Wolfram, was first used in the product Mathematica.

  • Is Wolfram Language code compiled or interpreted?

    Wolfram Language code is interpreted by the Wolfram kernel, and there are plans to compile it into an executable.

  • Is the Wolfram Language open source?

    No. The Wolfram Language is a proprietary language created by and licensed by Wolfram.

  • What is the cost of the Wolfram Language?

    The cost of using the Wolfram Language varies. You can write and run Wolfram Language code for free using the Wolfram Engine. However, if you'd like to use the more user-friendly front end, Mathematica or Wolfram|One is recommended. For running Wolfram code in a production environment, you'll typically need to contact Wolfram directly to discuss licensing options.

  • Who uses the Wolfram Language?

    If you check the TIOBE Index, you'll notice that the Wolfram Language isn't listed, as it remains fairly niche. It’s heavily used in academia, particularly by mathematicians and physicists. With an unmatched library of computational functions, the Wolfram Language is highly recommended for cutting-edge computational research.

  • What are the built-in data types?

    In the Wolfram Language, there are no traditional data types. Instead, everything is an expression, which can consist of simpler expressions. These fundamental types of expressions are:

    • Strings
    • Integers
    • Rational Numbers
    • Real Numbers
    • Complex Numbers
  • How many built-in functions does the Wolfram Language have?

    As of September 20, 2024, there are 6,408 built-in functions—or expressions—in the Wolfram Language. You can check how many are available in your version using this command:

    EntityValue["WolframLanguageSymbol", "EntityCount"]

Mathematica

A powerful computational platform from Wolfram.
A glowing octahedron with its point stuck in the ground