
Transposed Matrix
In linear algebra, the transpose of a matrix A is another matrix A T (also written A ′, A tr , t A or A t ) created by any one of the following equivalent actions:
- reflect A over its main diagonal (which runs from top-left to bottom-right) to obtain A T
- write the rows of A as the columns of A T
- write the columns of A as the rows of A T
Formally, the i th row, j th column element of A T is the j th row, i th column element of A :
[ A T ] i j = [ A ] j i
If A is an m × n matrix then A T is an n × m matrix.
You have been given a matrix as a 2D list with integers. ...