what does it mean about the solutions to a system if the det is 0

question:find all real numbers λ such that the homogenous system

(λ**I**n-A)**x**=**0** has a nontrivial solution

work: . Then the answer key says that (λ**I**n-A)**x**=**0 **has a nontrivial solution if and only if its determinant=0. So then to solve the problem the determinant is taken and the values for λ are used such that the determinant is 0. I'm sceptical about setting the determinant to 0 because if a system has a determinant that is 0 then it means the system only has the trivial solution or infinetly many solutions. So couldn't this mean that the system only has trivial solutions? or am I lossing sight of the question being asked(Angry)