0

Programm to find adjoint of a matrix.

the user can input a double dimension array and we have to display the matrix...as well as find its adjoint. can anyone post any algorithm to do so...

2nd Apr 2017, 10:32 AM
vimal tomar
vimal tomar - avatar
1 Antwort
+ 4
Displaying the matrix should be easy with two nested for loops iterating over rows and columns, just include spaces for proper formatting. If runtime is not a concern, you can write a simple recursive function to calculate the determinant and use that to get the input matrix's (n-1)x(n-1) minors, which are the entries of the classic adjoint. There is a lot to be optimised here, as for example you are computing several minors more than once. If you want an optimal solution, you should probably pick up a book on computer algebra.
2nd Apr 2017, 1:19 PM
Tob
Tob - avatar