I must make an identity matrix and I do not know how to start the algorithm.
I must make an identity matrix and I do not know how to start the algorithm.
It is defined as the diagonal matrix that has value 1 in each of the entries of the main diagonal, and 0 in the rest. So, in a 5x5 identity matrix it would be:
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
Already knowing that it is an identity marix, it should be easy to implement the code in C #.
Greetings