A problem in my textbook proceeds as follows:
Find $\det(A)$ given that $A$ has $p(\lambda)$ as its characteristic polynomial
a) $p(\lambda)=\lambda^3-2\lambda^2+\lambda+5$
b) $p(\lambda)=\lambda^4-\lambda^3+7$
What I did was:
a) Since $\det(\lambda I-A)=\lambda^3-2\lambda^2+\lambda+5$, then $\det(-A)=5$. Hence, $\det(A)=-5$. b) Since $\det(\lambda I-A)=\lambda^4-2\lambda^3+7$, then $\det(-A)=7$. Hence, $\det(A)=7$.
Am I correct here?
You are almost correct but not quite.
Hint. If $$A=\pmatrix{1&2\cr 1&1\cr}$$ write down $-A$ and find the determinants of $A$ and $-A$, doing all the working and not attempting to use any short cuts. Then repeat for $$A=\pmatrix{1&2&3\cr 1&1&2\cr -1&0&1\cr}\ .$$ What do you notice?