A more intricate example of broadcasting arises when building functions of several variables. Suppose, for instance, that we were given two functions of one variable, and , and that we want to construct a new function, , according to the formula:
 This is clearly a valid mathematical definition. We would like to express this definition as the sum of two functions in two variables defined as
,
and now we may simply write:
The situation is similar to that arising when adding a column matrix and a row matrix:
C = arange(2).reshape(-1,1) # column R = arange(2).reshape(1,-1) # row C + R # valid addition: array([[0.,1.],[1.,2.]])
This is especially useful when sampling functions of two variables, as shown in Section 5.5.3:Â Typical examples.