so here is the problem:

say i have a matrix

8 1 6 3 5 7 4 9 2

and i represent it as a list:

8 3 4 1 5 9 6 7 2

what i want is to return the position of the number in the list. As inputs i get the indexes of the matrix. ie for i=1, j=3 (row, column) the value is 6 and the position in the list is 7 (list is from 1 to 9)

I am looking for a relationship between the indexes of the matrix and the position in the list if any exists

cheers