Well, writing your own BigInteger class is out of the question as I said earlier.
Also I don't know what your teacher means about using a matrix and there's no Matrix class in the .NET framework in any case.
However, I'll show you a relatively easy way of adding two large numbers which doesn't use BigInteger but mimics how you'd add such numbers on a piece of paper using the basic rules of arithmetic. To do this we need to set up some arrays:
using System;
class Program
{
static void Main()
{
string number1 = "12345678978945612378945612378945612378945664563214722155278954";
string number2 = "7894561233214569877896541233214569874563258966558632889625";
string number3 = Add(number1, number2);
Console.WriteLine(number3);
Console.ReadKey();
}
static string Add(string n1, string n2)
{
int len1 = n1.Length;
int len2 = n2.Length;
int max = Math.Max(len1, len2);
int[] ia1 = new int[max];
int[] ia2 = new int[max];
int[] ia3 = new int[max + 1]; // allow for carry forward
for(int i = max - len1; i < max; i++) ia1[i] = n1[i + len1 - max] - 48;
for(int i = max - len2; i < max; i++) ia2[i] = n2[i + len2 - max] - 48;
int sum = 0;
int carry = 0;
for(int i = max - 1; i >= 0; i--)
{
sum = ia1[i] + ia2[i] + carry;
ia3[i + 1] = sum % 10;
carry = sum / 10;
}
if (carry == 1) ia3[0] = 1;
char[] c3 = new char[max + 1];
for(int i = 0; i < max + 1; i++) c3[i] = (char)(ia3[i] + 48);
return new string(c3).TrimStart('0');
}
}
Again the output is:
12353573540178826948823508920178826948820227822181280788168579