Mathematica/Basics

Mathematica code is fully-fledged programming language, complete with a proper syntax. It is very important to get the syntax right, or else the kernel will be unable to perform your task. Mathematica is notorious for a steep learning curve, and part of the reason for this is the rigidity of the language. The best way to learn Mathematica is to acquaint yourself thoroughly with the basic aspects of the code's structure before attempting complex tasks.

This page will provide a condensed overview of the basics of the Mathematica language. Links will be provided where necessary to more detailed explanations.

Basic Structure of the Language
Just as the smallest unit of the English language that still makes semantic sense is the word, the smallest unit of the Mathematica language is the object. Whenever you write some input, Mathematica first deconstructs this into a tree of objects and then interprets it. There are various types of token in Mathematica:

Any expression in Mathematica can then be nested functions of the form head[e1,e2,...] where head must be a Symbol and ei can be any of the supported object types or another function.