check whether a matrix is triangular or not.