# Working with Operators

You can think of an expression like f[x] as being formed by applying an operator f to the expression x. You can think of an expression like f[g[x]] as the result of composing the operators f and g, and applying the result to x.

 Composition[f,g,…] the composition of functions f, g, … RightComposition[f,g,…] the composition on the right of f, g, … InverseFunction[f] the inverse of a function f Identity the identity function

Some functional operations.

This represents the composition of the functions f, g, and Null:
 In[1]:=
 Out[1]=
You can manipulate compositions of functions symbolically:
 In[2]:=
 Out[2]=
The composition is evaluated explicitly when you supply a specific argument:
 In[3]:=
 Out[3]=
Composition can be entered using the operator @*:
 In[4]:=
 Out[4]=
RightComposition composes in the opposite order:
 In[5]:=
 Out[5]=
Composition on the right can be entered using the operator /*
 In[6]:=
 Out[6]=

You can get the sum of two expressions in the Wolfram System just by typing x+y. Sometimes it is also worthwhile to consider performing operations like addition on operators.

You can think of this as containing a sum of two operators f and g:
 In[7]:=
 Out[7]=
Using Through, you can convert the expression to a more explicit form:
 In[8]:=
 Out[8]=
This corresponds to the mathematical operator :
 In[9]:=
 Out[9]=
The Wolfram System does not automatically apply the separate pieces of the operator to an expression:
 In[10]:=
 Out[10]=
You can use Through to apply the operator:
 In[11]:=
 Out[11]=
 Identity[expr] the identity function Through[p[f1,f2][x],q] give p[f1[x], f2[x]] if p is the same as q Operate[p,f[x]] give p[f][x] Operate[p,f[x],n] apply p at level n in f MapAll[p,expr,Heads->True] apply p to all parts of expr, including heads

Operations for working with operators.

This has a complicated expression as a head:
 In[12]:=
 Out[12]=
Functions like Expand do not automatically go inside heads of expressions:
 In[13]:=
 Out[13]=