a. Write a program that finds the transpose of a square matrix,the user should e
ID: 3614304 • Letter: A
Question
a. Write a program that finds the transpose of a square matrix,the user should enter the elements of the matrix and the programshould print them in the transpose form. For example:
1 2 3 1 4 7
M = 4 5 6 then MT = 2 5 8
7 8 9 3 6 9
b. Use the program in (a) to determine the inverse of a squarematrix.
Hint:
A B C
If M = D E F
G H I
Then: M-1 = ( 1/delta)*MT
Where: Delta =A*(E*I-F*H)-B*(D*I-F*G)+C*(D*H-E*G)