Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Math & Counting Operations on Lists >

Total

Total[list]
gives the total of the elements in list.
Total[list, n]
totals all elements down to level n.
Total[list, {n}]
totals elements at level n.
Total[list, {n1, n2}]
totals elements at levels n1 through n2.
  • For a 2D array or matrix:  »
Total[list] or Total[list, {1}] totals for each column
Total[list, {2}] totals for each row
Total[list, 2] overall total of all elements
  • Total[f[e1, e2, ...]] gives the sum of the ei for any head f.  »
  • Total[list, Method->"CompensatedSummation"] uses compensated summation to reduce numerical error in the result.  »
New in 5 | Last modified in 6
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team