I want to know the exact relationship between matrix position and array index, where array contains the matrix data in each row appended format.
For example: I had a matrix of $3 \times4$ as follows:
[
[a, b, c, d],
[e, f, g, h],
[i, j, k, l],
]
And its array representation as follows:
[a, b, c, d, e, f, g, h, i, j, k, l,]
So if I say the position of item c is $[0,2]$ (by taking starting index as $[0,0]$) and then the position of c in array is 2, what is the relationship between these two indices, for any item in matrix?
Here I know the number of rows(nR) and column(nC) of matrix.
I need a relationship between these to position, so that I can create matrix position using array index and array index using matrix position.
Thanks you for all your valuble informations.
PS:Provide me some good tutorials to understand these things from basic levels.

The position in array is exactly equal to the number of elements before it if you start from $0$. The elements before it consist of two sets, one is the set of elements in the previous rows, the other is the previous elements in the current row. Let's name them $S_1$ and $S_2$.
Suppose the index in the matrix is $(i,j)$. There are then $i$ rows before it. So number of those elements will be $S_1=i\cdot nC$ where $nC$ is the number of elements in a row.
The number of elements before it in the current row is exactly $S_2=j$.
So the position in array is $i\cdot nC + j$.
REVERSE: S = arrayIndex row = (S+1) / Cn col = (S+1) % Cn -1