'intI represents row and 'intJ represents column of all the matrices. 'The intI in the for loop considers 'all the rows and intJ considers all 'the columns.So row is considered first 'and then the column, while performing 'every operation over matrix.

'Add data in first matrix M1. 'Here the first element is 10 and 'then it is incremented by 10. For intI = 0 To 2 For intJ = 0 To 2 'Value is saved in each cell of matrix M1(intI, intJ) = intValue intValue = intValue + 10 Next Next

For intI = 0 To 2 For intJ = 0 To 2 'In the matrix M2 ,transponse of matrix 'is saved.Rows are converted in columns and 'columns are converted into rows.In the matrix M1, 'intI represents row and intJ represents column. 'While saving value in M2,columns of matrix M1 'are considered first and then rows. M2(intI, intJ) = M1(intJ, intI) Next Next