public static Matrix outerProduct(List<double> v1begin, List<double> v2begin)
{
int size1 = v1begin.Count;
if (!(size1>0)) throw new ApplicationException("null first vector");
int size2 = v2begin.Count;
if(!(size2>0)) throw new ApplicationException("null second vector");
Matrix result = new Matrix(size1, size2);
for (int i=0; i<v1begin.Count; i++)
for(int j=0; j<v2begin.Count; j++)
result[i,j] = v1begin[i] * v2begin[j];
return result;
}