public int getElement(int i, int j) throws MatrixError {
        try {
            return array2d[j][i];
        } catch(IndexOutOfBoundsException e) {
            throw new MatrixError();
        } 
    }