static double[][] inverse(double[][] A){
		double[][] B;
		double detA = det(A);
		if(A.length == 1){
			B = new double[1][1];
			B[0][0] = 1/detA;
		}else{
			B = new double[A.length][A.length];
			B = transpose(cofactor(A));
			for(int i = 0; i < B.length; i++){
				for(int j = 0; j < B.length; j++){
					B[i][j] = B[i][j]/detA;
				}
			}
		}
		
		
		return B;
	}