Discrepancy in matrix determinant identity A simple application of the Weinstein-Aronszajn identity ($A,B$ rectangular matrices)
$$ \det(I+AB) = \det(I+BA) $$
is the following identity
$$ \det(C + \lambda u v^T) = \det C + \lambda v^T C^{adj} u, $$
where C is an $m \times m$ matrix and $u,v$ are vectors with $m$ rows (take $B = v^T$ and $A = \lambda C^{-1} u$).
The new identity possesses additional corollary, let $D$ be $n \times m $ rectangular matrix with $n \geq m $, $w$ be a vector with $n$ rows and $v$ vector with $m$ rows, then
$$ \det ( (D + \lambda w v^T)^T (D + \lambda w v^T)) = \det D^T D + 2\lambda v^T (D^T D)^{adj} D^T u + \lambda (u^T u) v^T (D^T D)^{adj} v $$
(to see this, take $C = D^T D, u= 2D^T w + \lambda (w^T w) v$).
However, a minimal example taking $$ D = \left(\begin{matrix} a & 0\\ b & 0\\ c & 0 \end{matrix}\right), w=(1,1,1)^T, v=(0,1)^T $$
gives a wrong answer
$$ 2\lambda (a+b+c)(a ^2+b ^2+c ^2) - 3\lambda^2 ( a ^2+b ^2+c ^2),$$
since the correct answer is obviously
$$ \det \left(\begin{matrix} a & \lambda \\ b & \lambda \\ c & \lambda \end{matrix}\right)^T \left(\begin{matrix} a & \lambda \\ b & \lambda \\ c & \lambda \end{matrix}\right) =  \det \left(\begin{matrix} a ^2+b ^2+c ^2 & \lambda (a+b+c) \\ \lambda (a+b+c) & 3 \lambda^2 \end{matrix}\right)= 3\lambda^2 (a ^2+b ^2+c ^2) - \lambda^2 (a+b+c)^2 $$
Where am I doing the mistake?
 A: Taking $C = D^T D, u= 2D^T w + \lambda (w^T w) v$ will not give you the required determinant. The problem is with the $2D^T w$ term, which is wrong since $\lambda D^{\rm T}  w v^{\rm T} \neq \lambda v w^{\rm T} D$.
Instead you could have written
$$
\det \left[ (D + \lambda w v^{\rm T})^{\rm T}(D + \lambda w v^{\rm T}) \right]
=
\det \left( D^{\rm T}D + 
\lambda
\begin{bmatrix}
D ^{\rm T} w & v & \lambda w^{\rm T} w\cdot v
\end{bmatrix}
\begin{bmatrix}
v^{\rm T}\\
w^{\rm T} D\\
v^{\rm T}
\end{bmatrix}
\right),
$$
Applying the generalization of the Matrix determinant lemma1, which is
$$
\det\left({Q} + {UAV}^\textsf{T}\right) = \det\left({A}^{-1} + {V}^\textsf{T}{Q}^{-1}{U}\right)\det\left({A}\right)\det\left({Q}\right),
$$
yields
$$
\det \left[ (D + \lambda w v^{\rm T})^{\textsf T}(D + \lambda w v^{\rm T}) \right]
=
 \det(D^{\rm T}D)\cdot
\det \left( I_3 + 
\lambda
\begin{bmatrix}
v^{\rm T}\\
w^{\rm T} D\\
v^{\rm T}
\end{bmatrix}
(D^{\rm T}D)^{-1}
\begin{bmatrix}
D ^{\rm T} w & v & \lambda w^{\rm T} w \cdot v
\end{bmatrix}
\right),
$$
where it is the $3\times3$ matrix under the second determinant.
You can simplify it by expressing it in term of the determinant of a $2\times 2$ matrix:
$$
\det \left[ (D + \lambda w v^{\rm T})^{\textsf T}(D + \lambda w v^{\rm T}) \right]
=
 \det(D^{\rm T}D)\cdot
\det \left( I_2 + 
\lambda
\begin{bmatrix}
v^{\rm T}\\
w^{\rm T} D
\end{bmatrix}
(D^{\rm T}D)^{-1}
\begin{bmatrix}
D ^{\rm T} w & v
\end{bmatrix}
\right)
+
\lambda^2 w^{\rm T} w \cdot v^{\rm T} \cdot {\rm adj}(D^{\rm T}D) \cdot v
,
$$
These formulae, however, will not work when $D^{\rm T}D$ is degenerate as it is in your example.
