I have a question that's asking me to take a 3 x 4 matrix and use the index $i, j$ of each entry to calculate the entries position in a 1 x 12 matrix.
I found the following formula which I think is correct:
$n = i\times Ncol + j$ where i is the row number, j is the column an entry belongs to and Ncol is the total number of columns (also starting index from 0).
So that's an equation to find n in terms of i and j. But the next part of the question asks me to find equations for i and j in terms of n such that I can get the original position of the 2d matrix back and this is confusing me.