Find all conditions of a and b for when matrix has determinant zero Find all conditions on a and b for which A =
\begin{bmatrix} a & 0 &a^2 \\ 2 & a & 3a \\ a & -1 & ba+b\end{bmatrix} 
has determinant 0.

Subtract $a$ times first column from third to obtain
$$\begin{pmatrix}a&0&0\\2&a&a\\a&-1&ba+b-a^2\end{pmatrix} $$
which has determinant $0$ iff the original matrix has detrminant $0$.
If $a=0$, the first row is zero, hence $\det A=0$.
If $a\ne 0$, any linear combinations of the columns that results in zero must not use the first column. Hence we need only check if the second and third column are linearly dependent. Under the premise that $a\ne 0$, this is the case iff $-1=ba+b-a^2$. To solve this for $b$  we'd like to divide by $a+1$, hence have to distinguish cases: If $a=-1$, we obtain $ba+b-a^2=-1$ for all $b$; if $a\ne -1$ we can solve as $b=\frac{a^2-1}{a+1}=a-1$.
Thus
$\det A=0$ iff $a=0$ or $a=-1$ or $b=a-1$.
