How to find the determinant A from an equation having A as variable? I'm currently struggling because I can't find the answer do this. 
If anyone can help me, it would be great.

A is a $5\times 5$ non scalar matrix,
  $(A+2)(A+A^3+1)^2 (A^2+A^3+1)^3 =0 $
a) Find det(A)
b) Is A diagonalizable or not? Explain.

 A: I will answer the question assuming that you are working on the field of the rational number, in other fields of characteristic zero there would be some ambiguities. If we use the Hamilton-Cayley theorem we find that the minimum polynomial of A must divide the polynomial you wrote and must have degree $\le 5$. Notice also that the two polynomial of degree 3 in you factorization are both irreducible (can you verify this?). Now , since the minimum polynomial lives in $\mathbb{Q}[x]$ you find that is in the form $(x+2)p(x)$ where p(x) is one of the two polynomial of degree 3. Why is this? Because if the minimum polynomial is $x+2$ A woul be scalar, if was p(x) the characterisic polinomial would be a power of p(x) wich has degree greater than 5. So we can conclude that A is not diagonalizable since the minim polynomial does not split in linear factors and the characteristic polynomial needs to be $(x+2)^2p(x)$. Now the determinant is the coefficient of degree zero of this polynomial times  -1^5 (the dimension of the space) so we get -4, indipentently from the choice of p(x).
