/* This is the java program to find whether the vectors entered by users form the basis for the given dimension. The result for the same can be obtained by checking whether the determinant of the matrix formed by vectors is zero or not. If the determinant is non zero its forms the basis for the given dimension, not otherwise. */ //This is a sample program to find the basis and dimension of a vectors import java.util.Scanner; public class Basis_Dimension_Matrix { public static double determinant(double A[][],int N) { double det=0; if(N == 1) { det = A[0][0]; } else if (N == 2) { det = A[0][0]*A[1][1] - A[1][0]*A[0][1]; } else { det=0; for(int j1=0; j1