$\mbox{rank}(A)=1$ implies $\det(A+I)=\mbox{trace}(A)+1$ [closed]

This problem comes from exercise from my lecturer

Let $A$ be a square matrix such that $\mbox{rank}(A)=1$. Prove that $\det(A+I)=\mbox{trace}(A)+1$.

($I$ is the identy matrix)

I usually haven't any idea in solving linear algebra problem.


Edited in response to julien's comment

Recall that:

1) the rank is greater than or equal to the number of non-zero eigenvalues

2) the determinant is equal to the product of all eigenvalues

3) the trace is equal to the sum of all eigenvalues

You should also be able to show that if $\lambda$ is an eigenvalue of $A$ then $\lambda+1$ is an eigenvalue of $A+I$

I think you should be able to do the proof now. Let me know if you need more help.


Hint: If the rank of the matrix is $1$, it means that all columns can be written as multiples of one of them (say, wlog, the first one); since the determinant is invariant by linear combination of the columns, you can write $\det(A+I)$ as $\det(A'+I)$, where $A'$ and $A$ have same rank, but only the first column of $A'$ is non-zero.