# $$\text{Sum}$$¶

You can use the :math:\text{Sum} function to calculate the sum from a list of values.

You can use the \sum backslash command to insert this function.

The following variants of this function are available:

• $$\text{complex } \text{Sum} \left ( \ldots \right )$$

You can supply a list containing, single values, sets, tuples, and matrices. The sum will be calculated using all the supplied scalar values. If you supply a set or tuple containing other iterable types, then those types will also be recursively iterated over to locate basic values.

Note that run-time type conversion allows the result of this function to be assigned to any scalar type provided the returned value is compatible with that type.

Figure 207 shows the basic use of the $$\text{Sum}$$ function.

Figure 207 Example Use Of The Sum Function