If $\vert A\vert+\vert B\vert =0,$ then What is the value of $\vert A+B\vert$? 
There are two square matrices $A$ and $B$ of same order such that
$A^2=I$ and $B^2=I,$Where $I$ is a unit matrix.If $\vert A\vert+\vert
 B\vert =0,$ then find the value of $\vert A+B\vert ,$here $\vert
 A\vert$ denotes the determinant of matrix $A$

Solution: Since $A^2=I$
then Cayley-Hamilton theorem implies that the characteristic polynomial of last equation is $\lambda_A^2-1=0\implies \lambda_A=+1,-1$.
Since the product of Eigenvalues of a matrix is equal to the determinant of the matrix,So$\vert A\vert =(+1)(-1)=-1\tag{1}$.
Similarly,Since $B^2=I$
then Cayley-Hamilton theorem implies that the characteristic polynomial of last equation is $\lambda_B^2-1=0\implies \lambda_B=+1,-1$.
Since the product of Eigenvalues of a matrix is equal to the determinant of the matrix,So$\vert B\vert =(+1)(-1)=-1\tag{2}$.
Equations $(1)$ & $(2)$ implies that $\vert A\vert +\vert B\vert=-2$
But,it is given that $\vert A\vert+\vert B\vert =0$
Please point out my mistake??
 A: This question is interesting and a little more complicated than it looks like. I also know that the question of the OP is about a mistake but I felt that a solution to this problem would be welcome. Perhaps some future readers will find that helpful.
So, here we go. As already pointed out, the minimal polynomial $p(x)$ for chosen matrices $A$ and $B$ satisfying $A^2=B^2=I$ is given by $p(x)=x^2-1$ or by one of its factors, i.e. $x+1$ or $x-1$. This means that the eigenvalues of $A$ and $B$ can only take the values -1 and 1. From the expressions $A^2-I=0$ and $B^2-I=0$, we also get that $A=A^{-1}$ and $B=B^{-1}$.
Now since the determinant of if the product of the eigenvalues, then the determinant of those matrices can either be 1 or -1. This means that if the sum of $|A|$ and $|B|$ needs to be zero, then we necessarily have that one matrix has an even number of eigenvalues equal to -1 while the other has an odd number. This is formalized as follows
$$|A|+|B|=|A|(1+|A^{-1}||B|)=|A|(1+|A||B|)=|A|(1+|AB|)$$
where we have used the usual determinant product rules and the fact that $A=A^{-1}$ since $A^2=I$. Since $|A|\ne0$ then we must have that $1+|AB|=1+|A||B|=0$ which means that we need to have $|A|=1$ and $|B|=-1$, or vice-versa.
Assume now that $|A|=1$ and $|B|=-1$. We need to find what is $|A+B|$. The issue here is that there is no general formula for the eigenvalues of a sum of two matrices except in few cases; e.g. simultaneously diagonalizable, etc.
For that we consider the characteristic polynomial $q(x):=|xI-AB|$. Using determinant formulas and the facts that $A=A^{-1}$ and $B=B^{-1}$, we get that
$$q(x)=|A|\cdot|xA-B|\ \mathrm{and}\ q(x)=|B|\cdot|xB-A|.$$
Since, $|A|=1$ and $|B|=-1$, we get that
$$|xA-B|=-|xB-A|.$$ Substituting $x=-1$ yields that
$$(-1)^n|A+B|=(-1)^{n+1}|B+A|$$ which implies that $|A+B|=0$. This also means that $AB$ has an eigenvalue at $-1$.
A: "then Cayley-Hamilton theorem implies that the characteristic polynomial of last equation is $\lambda_A^2-1=0\implies \lambda_A=+1,-1$."
This implies that the eigenvalues of $A$ are contained in the set $\{-1,+1\}$. So in general they're something like $-1, -1, -1, \ldots, +1,+1,+1,\ldots$. So the determinant is $(-1)^r(+1)^s$ where $r$ is the number of $-1$'s, $s$ is the number of $+1$'s and $r+s=n$, the size of the matrix.
