add triu/tril (get upper/lower triangular parts of a square matrix)