It is impossible to get into computer graphics with any depth without encountering the summation symbol and the corresponding linear mathematics. The summations symbol looks something like a capital letter E - actually the Greek letter sigma. In the example below assume that (n) is sitting on top of the letter E and (k = 1) is sitting below the letter E... S(n) = (n) E (k = 1) f(k) Here we are looking for the sum which results of applying the function f on the variable k n number of times. Summation then consists of 'looping' through a function beginning from K ( the lower limit) going to N (the upper limit) and using the variable K in the function F for n - k times. In otherwords, in terms of computer programming, summation is found expressed in the form of loops, typically for loops so the mathematics described by the equation illustrated above would look something like this... var sum : integer; begin sum := 0; for k = 1 to n do begin sum := sum + f(k); end; Here the function ' f ' is passed the variable ' k ' each time through the loop and the result accumulates in the variable sum. Mathematically, this can also be seen written as... S(n) = f(1) + f(2) + ... + f(n-1) + f(n) or S(n-1) + f(n) since S(n- 1) includes the summation of all previous values... The upper limit must be greater than or equal to the lower limit. If the upper limit is less than the lower limit the sum is defined as zero. You can compare this situation to a for loop which states that ... for x := 10 to 5 do begin ... where the test fails (note that it is possible to state that ... for x := 10 downto 5 do begin ... but this is a different case). In summations in mathematics the upper limit is always greater than or equal to the lower limit. The function in the summation mathematics (symbolized generically by f(n) in the example above) corresponds to what will be found in the body of the for loop. For example let's suppose the mathematics describes the following summation... S(n) = (5) E (k = 1) k * 2 We could translate this into the following computer program... var sum, k : integer; begin sum := 0; for k := 1 to 5 do begin sum := sum + K * 2; end; So then the variable on the bottom of the summation symbol is the for loop variable. S(n) (or whatever variable is used) holds the result of the summation. The variable on top of the summation symbol is the end variable of the for loop. What follows to the right is the actual function code which describes what happens in the body of the for loop, with the summation results assigned to the variable which will hold the sum. This function could be something as simple as 'multiply k by 2' to a calculus equation which is performed repeatedly on each run through the loop. A few things to keep in mind as regards summations... Let's suppose that the results of two functions are to be added together. Both functions can be processed separately and the summation performed in two seperate loops. S(n) = (5) E (k = 1) f(k) + g(k) Here two functions f and g are added together after the summation symbol. This can be rewrriten as S(n) = (5) E (k = 1) f(k) + (5) E (k = 1) g(k) So in terms of a computer program for this second example we get... sum, k : integer; begin sum := 0; for k := 1 to 5 do begin sum := sum + f(k); end; for k := 1 to 5 do begin sum := sum + g(k); end; In otherwords the two functions that are to be added together can be processed sequentially and the results accumulated in sequence in the variable 'sum' and the results will be correct. Similarly both functions could be evaluated in the body of one loop and the results will also be correct. So then if we code two functions after the summation symbol as in the first example, we get... sum k : integer; begin sum := 0; for k := 1 to 5 do begin sum := sum + f(k); sum := sum + g(k); end; When a scalar is used to multiply the function the scalar can be applied after the for loop has concluded. In the example below a constant scalar 'c' will be multiplied by the function result. S(n) = (5) E (k = 1) c * f(k) The scalar c can separated from the function and applied after the for loop has concluded. For example let us suppose that the function f(k) consists of adding 2 to k. The loop runs from 1 to 5 so the summation consists of 3 + 4 + 5 + 6 + 7 = 25. Now let us suppose that the scalar variable c is equal to 2. If we apply this to each iteration through the loop and then sum this gives us 6 + 8 + 10 + 12 + 14 = 50. Similarly if we apply the scalar after the for loop we get 25 * 2 = 50, the same result as before. So then in summation mathematics you might see the scalar attached to the function or the scalar might appear before the summation symbol, and in both cases the results is always the same. Computationally, it is probably more efficient to apply the scalar and multiply only once after the for loop has concluded, so then when a scalar is shown as multiplying a function result in a summation it is probably best to arrange the computation to take place after the summation loop has concluded, if only because this will be faster and require less machine cycles, and since the result is going to be the same faster is the best choice. In the following example summation will be used to sum up the results of multiplying the elements in two arrays. Note that the sum will be returned in the 'Result' variable of the function... S(n) = (n) E (k = 1) a[k] * b[k] function SumArrays(n : integer; var a, b : array of integer):integer; var k : integer; begin Result := 0; for k := 1 to n do begin Result := Result + (a[k] * b[k]); end; end;