package Misc;
import java.util.Scanner;
/*
* Wikipedia link : https://en.wikipedia.org/wiki/Invertible_matrix
*
* Here we use gauss elimination method to find the inverse of a given matrix.
* To understand gauss elimination method to find inverse of a matrix: https://www.sangakoo.com/en/unit/inverse-matrix-method-of-gaussian-elimination
*
* We can also find the inverse of a matrix
*/
public class InverseOfMatrix
{
public static void main(String argv[])
{
Scanner input = new Scanner(System.in);
System.out.println("Enter the matrix size (Square matrix only): ");
int n = input.nextInt();
double a[][]= new double[n][n];
System.out.println("Enter the elements of matrix: ");
for(int i=0; i