The best part of this recipe is that we will not only display the transpose of the matrix using pointers, but we will also create the matrix itself using pointers.
The transpose of a matrix is a new matrix that has rows equal to the number of columns of the original matrix and columns equal to the number of rows. The following diagram shows you a matrix of order 2 x 3 and its transpose, of order 3 x 2:
Figure 4.29
Basically, we can say that, upon converting the rows into columns and columns into rows of a matrix, you get its transpose.