If b^2=b, then det(b^2)=det(b)^2=det(b), which has two solutions for det(b). For the second part, since a singular matrix doesn't have an inverse, you are forced into the only allowed non-zero determinant.