Difference between revisions of "Sum Command"

From GeoGebra Manual
Jump to: navigation, search
m (1 revision)
(added v.4 - note/example formatting)
Line 1: Line 1:
<noinclude>{{Manual Page}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
+
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
 
{{command|statistics}}
 
{{command|statistics}}
 
; Sum[List]: Calculates the sum of all list elements.
 
; Sum[List]: Calculates the sum of all list elements.
: Note: This command works for numbers, points, vectors, text, and functions.
+
: {{Note| This command works for numbers, points, vectors, text, and functions.}}
Examples:
+
: {{Example|1=&nbsp;
:* <tt>Sum[{1, 2, 3}]</tt> gives you a number ''a = 6''.
+
:* <tt>Sum[{1, 2, 3}]</tt> gives you the number ''a = 6''.
 
:* <tt>Sum[{x^2, x^3}]</tt> gives you ''f(x) = x<sup>2</sup> + x<sup>3</sup>''.
 
:* <tt>Sum[{x^2, x^3}]</tt> gives you ''f(x) = x<sup>2</sup> + x<sup>3</sup>''.
:* <tt>Sum[Sequence[i,i,1,100]]</tt> gives you a number ''a = 5050''.
+
:* <tt>Sum[Sequence[i,i,1,100]]</tt> gives you the number ''a = 5050''.
:* <tt>Sum[{(1, 2), (2, 3)}]</tt> gives you a point ''A = (3, 5)''.
+
:* <tt>Sum[{(1, 2), (2, 3)}]</tt> gives you the point ''A = (3, 5)''.
:* <tt>Sum[{(1, 2), 3}]</tt> gives you point ''B = (4, 2)''.
+
:* <tt>Sum[{(1, 2), 3}]</tt> gives you the point ''B = (4, 2)''.
:* <tt>Sum[{"a","b","c"}]</tt> gives you the text ''"abc"''.
+
:* <tt>Sum[{"a","b","c"}]</tt> gives you the text ''"abc"''.}}
 +
 
 
; Sum[List, Number n of Elements]: Calculates the sum of the first ''n'' list elements.  
 
; Sum[List, Number n of Elements]: Calculates the sum of the first ''n'' list elements.  
: Note: This command works for numbers, points, vectors, text, and functions.
+
: {{Note| This command works for numbers, points, vectors, text, and functions.}}
: Example: <tt>Sum[{1, 2, 3, 4, 5, 6}, 4]</tt> gives you the number ''a = 10''.
+
: {{Example| 1=<tt>Sum[{1, 2, 3, 4, 5, 6}, 4]</tt> gives you the number ''a = 10''.}}

Revision as of 12:38, 14 February 2011


Sum[List]
Calculates the sum of all list elements.
Note: This command works for numbers, points, vectors, text, and functions.
Example:  
  • Sum[{1, 2, 3}] gives you the number a = 6.
  • Sum[{x^2, x^3}] gives you f(x) = x2 + x3.
  • Sum[Sequence[i,i,1,100]] gives you the number a = 5050.
  • Sum[{(1, 2), (2, 3)}] gives you the point A = (3, 5).
  • Sum[{(1, 2), 3}] gives you the point B = (4, 2).
  • Sum[{"a","b","c"}] gives you the text "abc".


Sum[List, Number n of Elements]
Calculates the sum of the first n list elements.
Note: This command works for numbers, points, vectors, text, and functions.
Example: Sum[{1, 2, 3, 4, 5, 6}, 4] gives you the number a = 10.
© 2022 International GeoGebra Institute