The basic concept is
range [-5....5,3......13]
Now make it normal so that execution is easy
-5 to 5 {contains 11 rows }
3 to 13 {contains 11 col}
size of an array A 11 x 11
ranges [0 ....10 , 0 ... 10]
shift from -5 to 0 we add 5
shift from +3 to 0 subtract 3
therefore A[0+5][8-3]
A[5][5] = 100 + (11*5+5)*2
= 100 + 60*2
= 220
similarly we do for col major oder