Program to find the transpose of a given matrixExplanationIn this program, we need to find the transpose of the given matrix and print the resulting matrix. Transpose of a matrix:Transpose of a matrix can be found by interchanging rows with the column that is, rows of the original matrix will become columns of the new matrix. Similarly, columns in the original matrix will become rows in the new matrix. The operation can be represented as follows: [ AT ]_{ij} = [ A ]_{ji} If the dimension of the original matrix is 2 × 3 then, the dimensions of the new transposed matrix will be 3 × 2. Algorithm
SolutionPythonOutput: Transpose of given matrix: 1 4 7 2 5 8 3 6 9 COutput: Transpose of given matrix: 1 4 7 2 5 8 3 6 9 JAVAOutput: Transpose of given matrix: 1 4 7 2 5 8 3 6 9 C#Output: Transpose of given matrix: 1 4 7 2 5 8 3 6 9 PHPOutput: Transpose of given matrix: 1 4 7 2 5 8 3 6 9
Next Topic#
