Check whether a square matrix has non-zero entries only on the main diagonal and the diagonal directly below it.
Check whether a square matrix has non-zero entries only on the main diagonal and the diagonal directly below it.
This is the mirror image of the (upper) bidiagonal test — non-zero values are allowed on the main diagonal and the subdiagonal directly below it, but everywhere else must be zero.