How sum work, vectors and matrices I am having troubles understanding what is going on here. Would anyone be able to do this step by step with values so that I will be able to understand the SUM and how it works. 
xi is in this case colum 1, and Matrix X is the entire thing.
Matrix X
Also note that looking at the large general matrix you it should have a diagonal with sum of squares and off-diagonal is the cross product. 

Also to clarify X`X(where 'is the transpose) is equal to the one above. This I am not able to understand. 
To Clarify the question, It is stated in the book that X'X should be equal to the sumof xixi'. --> as shown in the picture. however if I take Matrix(as given above) X'X i get {{4,14},{14,54}}. When I try this with the sum function  I am not able to get the same result, could someone please be so kind to take the effort writing this example out step by step. 
 A: The setup described below seems to be purely formal. But it is motivated by the underlying conceptual content, as explained in linear algebra courses.
A matrix $A=[a_{ik}]$ is with $m$ rows and $n$ columns is called an $(m\times n)$-matrix. When an  $(m\times n)$ matrix $A$ and an $(n\times p)$-matrix $B$ are given (note the $n$ appearing twice here) then their product $AB$, an $(n\times p)$ matrix, is defined by
$${\rm elm}_{jl}(AB):={\rm row}_j(A)\cdot {\rm col}_l(B):=\sum_{k=1}^n a_{jk}\>b_{kl}\qquad(1\leq j\leq m, \>1\leq l\leq p)\ .\tag{1}$$
Here the $\cdot$ denotes the usual scalar product between tuples of the same length.
An $n$-tuple ${\bf x}=(x_1,x_2,\ldots, x_n)\in{\mathbb R}^n$ is by convention considered as a column vector, i.e., an $(n\times 1)$-matrix, with the $x_k$ as entries, and one writes ${\bf x}'$ for the analogous row vector, i.e., the $(1\times n)$-matrix with the $x_k$ in its single row.
Given two vectors ${\bf x}$ and ${\bf y}$ both products ${\bf x}'{\bf y}$ and ${\bf x}{\bf y}'$ are defined since the "compatibility condition" is fulfilled in both cases. The result of the first multiplication is a $(1\times 1)$-matrix, which is the same as a number. This number is nothing else but the usual  scalar product of the two vectors ${\bf x}, {\bf y}\in{\mathbb R}^n$. 
The result of the second multiplication however is an $(n\times n)$-matrix whose elements according to $(1)$ are given by
$${\rm elm}_{jl}({\bf x}{\bf y}')=\sum_{k=1}^1 {\bf x}_{jk}\>{\bf y}'_{kl}=x_j\>y_l\qquad(1\leq j\leq n, \>1\leq l\leq n)\ .\tag{2}$$
In your case you are given a list of $N$ vectors $${\bf x}_i=(x_{i.1},x_{i.2},\ldots, x_{i.K})\in{\mathbb R}^K\qquad(1\leq i\leq N)\ .$$ 
The index $i$ does not number any components, but denotes the position of the vector ${\bf x}_i$ in the list, and I refer to the components after the dot. 
According to the above each  product of the form ${\bf x}_i{\bf x}'_i$ $\>(1\leq i\leq N)\ $ is a $(K\times K)$-matrix whose elements according to $(2)$ are given by
$${\rm elm}_{jl}({\bf x}_i{\bf x}_i')=x_{i.j}\>x_{i.l}\qquad(1\leq j\leq K, \>1\leq l\leq K)\ .\tag{2}$$
The sum $S:=\sum_{i=1}^N{\bf x}_i{\bf x}_i'$ of these $N$ matrices is to be taken elementwise. Therefore it is again a $(K\times K)$-matrix, whose elements are given by
$${\rm elm}_{jl}(S)=\sum_{i=1}^N x_{i.j}\>x_{i.l}\ ,$$
as displayed in your question.
Consider the following numerical example: We are given the two vectors (number triples)
$${\bf x}_1:=(2,3,5),\quad {\bf x}_2:=(1,1,1)\ .$$
This corresponds to $N=2$ and $K=3$. Then
$${\bf x}_1{\bf x}'_1=\left[\matrix{2\cr 3\cr 5\cr}\right]\>[2\ 3\ 5]= 
\left[\matrix{4&6&10\cr 6&9&15\cr 10&15&25\cr}\right]\ ,\qquad
{\bf x}_2{\bf x}'_2=\left[\matrix{1\cr 1\cr 1\cr}\right]\>[1\ 1\ 1]= 
\left[\matrix{1&1&1\cr 1&1&1\cr 1&1&1\cr}\right]\ .$$
It follows that
$$S=\sum_{i=1}^2 {\bf x}_i{\bf x}'_i=\left[\matrix{5&7&11\cr 7&10&16\cr 11&16&26\cr}\right]\ .$$
The "$10$" in the center of the  matrix $S$ results from $9+1=x_{1.2}^2+x_{2.2}^2$, as indicated in the displayed source.
A: We know that a column vector multiplied by a row vector is a matrix (not to be confused with the row vector by a column vector, which is the inner product). The transpose of a vector essentially 'converts' it into another alignment of vector. Thus:
$$\vec X = \left( \begin{array}{ccc}
a \\ 
b \\ 
c \\ \end{array} \right) \\
\vec X' = \left( \begin{array}{ccc}
a & b & c\end{array} \right)$$
Reviewing sigma notation, we're adding up all the terms $n$ times, and $i$ counts it. It repeats each time until the $i$ is equal to the initial $i_0 + n$. Thus, for $X\cdot X'$, we multiply the two vectors and distribute the sigma to each component.
A: Given two column vectors a and b, the Euclidean inner product and outer product are the simplest special cases of the matrix product, by transposing the column vectors into row vectors.
The inner product is the normal product which will yield a scalar.
The outer/ tensor product however,is a row vector multiplied on the left by a column vector:
see the link below :-
http://upload.wikimedia.org/math/e/6/a/e6aa3360fc8cf1a1fb71a42885aba8c3.png
The multiplication given in the question is an outer/ tensor product. 
The vector 'xi' can be interpreted as a rank 1 tensor with dimension K, and the vector 'xiT' as a rank 1 tensor with dimension K. The result is a rank 2 tensor with dimension (K, K).
And Sigma sign gets distributed inside the (K,K) matrix.
