public int[] pivot(){
    	    double[] max = this.maximumElement();
    	    int maxI = (int)max[1];
    	    int maxJ = (int)max[2];
    	    double[] min = this.minimumElement();
    	    int minI = (int)min[1];
    	    int minJ = (int)min[2];
    	    if(Math.abs(min[0])>Math.abs(max[0])){
    	        maxI = minI;
    	        maxJ = minJ;
    	    }
    	    int[] ret = {maxI, maxJ};

    	    double[] hold1 = this.matrix[0];
    	    this.matrix[0] = this.matrix[maxI];
    	    this.matrix[maxI] = hold1;
    	    double hold2 = 0.0;
    	    for(int i=0; i<this.numberOfRows; i++){
    	        hold2 = this.matrix[i][0];
    	        this.matrix[i][0] = this.matrix[i][maxJ];
    	        this.matrix[i][maxJ] = hold2;
    	    }

    	    return ret;
    	}