public boolean isNearlyIdenty(double tolerance){
    	    boolean test = true;
    	    if(this.numberOfRows==this.numberOfColumns){
    	        for(int i=0; i<this.numberOfRows; i++){
    	            if(Math.abs(this.matrix[i][i]-1.0D)>Math.abs(tolerance))test = false;
    	            for(int j=i+1; j<this.numberOfColumns; j++){
    	                if(Math.abs(this.matrix[i][j])>Math.abs(tolerance))test = false;
    	                if(Math.abs(this.matrix[j][i])>Math.abs(tolerance))test = false;
    	            }
    	        }
    	    }
    	    else{
    	        test = false;
    	    }
    	    return test;
    	}