Implement the following method to obtain an inverse of the matrix:
public static double[ ][ ] inverse(double[ ][ ] A)
Sample 1
Enter a11, a12, a13, a21, a22, a23, a31, a32, a33: 1 2 1 2 3 1 4 5 3
-2.0 0.5 0.5
1.0 0.5 -0.5
1.0 -1.5 0.5
Sample 2
Enter a11, a12, a13, a21, a22, a23, a31, a32, a33: 1 4 2 2 5 8 2 1 8
2.0 -1.875 1.375
0.0 0.25 -0.25
-0.5 0.4375 -0.1875
/**
*
* InverseMatrix.java : Compute the inverse of matrix 3x3.
*
*/
import java.util.Scanner;
public class InverseMatrix {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
final int N = 3;
double[][] A = new double[N][N];
System.out.print("Enter a11, a12, a13, a21, a22, a23, a31, a32, a33: ");
for (int i = 0; i < A.length; ++i)
for