col(x) row(x)
x[row(x)>col(x)] <- 0 # zero the strict lower triangle of x x[row(x)-col(x)==1] # first sub-diagonal