This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Numerical Computation / Data Manipulation /

Total

FilledSmallSquare Total[list] gives the total of the elements in list.

FilledSmallSquare Total[list, n] totals all elements down to level n.

FilledSmallSquare Total[list] is equivalent to Apply[Plus, list].

FilledSmallSquare Total[f[, , ... ], 1] gives the sum of the for any head f.

FilledSmallSquare Total is defined so that Total[, , ... , , , ... , ... ] gives Total[, , ... ], Total[, , ... ].

FilledSmallSquare Total[list, Method->"CompensatedSummation"] uses compensated summation to reduce numerical error in the result.

FilledSmallSquare Total works with SparseArray objects.

FilledSmallSquare See Section 1.6.7 and Section 3.8.1.

FilledSmallSquare See also: Plus, Tr, Mean, Count, Norm, Sum, Max.

FilledSmallSquare New in Version 5.0.

Further Examples