import java.io.*;

class Matrix5
{
  public static void main(String args[]) throws IOException
  {
  //calculation of an inverse matrix
  double a[][];
  a=new double[2][2];
  a[0][0]=1;
  a[0][1]=2;
  a[1][0]=3;
  a[1][1]=4;
  System.out.println("Matrix : ");
  System.out.println(Matrix.toString(a));
  System.out.println("Inverse Matrix : ");
  System.out.println(Matrix.toString(Matrix.inv(a)));
  System.out.println("Matrix * Inverse Matrix :");
  System.out.println(Matrix.toString(Matrix.multiply(a,Matrix.inv(a))));
  System.out.println("Determinant = "+Matrix.det(a));
  }
}
