$$A=\begin{pmatrix}a & 6 & 7\\ a &-8 & 9\\ 3 &-9 & a\end{pmatrix}$$
Find the values of $a$ so that $\det A=0$
When I do it I get $a = 5.54$ or $a = -4.25$ but when I substitute those values back to find determinant I don't get $\det A=0$
$$A=\begin{pmatrix}a & 6 & 7\\ a &-8 & 9\\ 3 &-9 & a\end{pmatrix}$$
Find the values of $a$ so that $\det A=0$
When I do it I get $a = 5.54$ or $a = -4.25$ but when I substitute those values back to find determinant I don't get $\det A=0$
On
Setting the determinant to zero, we seek to solve for $a$ in \begin{equation*} \det A = a(-8a+81) - 6(a^2 - 27) + 7(-9a+24) = -14a^2 + 18a + 330 = 0. \end{equation*} Use the quadratic formula to find \begin{equation*} a = \frac{18 \pm \sqrt{18804}}{28}. \end{equation*}
On
For a matrix $$\begin{pmatrix}a&b&c\\d&e&f\\g&h&i\end{pmatrix}$$ the determinant is equal to $$a(ei-fh)-b(di-fg)+c(dh-eg)$$
For your example, $$A=\begin{pmatrix}a&6&7\\a&-8&9\\3&-9&a\end{pmatrix}$$
We put this into the formula and get
\begin{align}\det A &= a(-8a-(-9\times 9))-6(a\times a-(9\times 3))+7(-9a-(-8\times 3))\\ &=a(-8a+81)-6(a^2-27)+7(-9a+24)\\ &=-8a^2+81a-6a^2+162-63a+168\\ &=-14a^2+18a+330\end{align}
Now we need to solve this for $\det A=0$, so we say \begin{align}-14a^2+18a+330&=0\\ 14a^2-18a-330&=0\end{align}
This is a quadratic equation, so we can solve this in the normal way to get \begin{align}a_1&=\frac1{14}(9-\sqrt{4701})\\ a_2&=\frac 1{14}(9+\sqrt{4701})\end{align}
If we round these to 2 decimal places, as you have done, then we get \begin{align}a_1&\approx-4.25\\ a_2&\approx5.54\end{align}
which are the values that you had found.
When checking the answers, you need to use the exact result, i.e. the ones with the square roots in them, otherwise you will encounter rounding errors which is presumably where your confusion is coming from.
On
Hint:
Using your values given with two presumably exact decimals, we can infer
$$5.53<a<5.55,$$
and observe
$$\left.\det(A)\right|_{a=5.53}=-0.7037,\\\left.\det(A)\right|_{a=5.55}=+0.6675.$$
So there is indeed a root in that range.
On
That's no surprise. If you use an approximate value for the roots, you'll get approximate values for the determinant.
It's not really different from $1.41^2=1.9881$ and $1.4142^2=1.99996164$. Neither is “exactly $2$”.
> gp
GP/PARI CALCULATOR Version 2.11.3 (released)
i386 running darwin (x86-64/GMP-6.2.0 kernel) 64-bit version
compiled: Mar 4 2020, Apple clang version 11.0.0 (clang-1100.0.33.17)
threading engine: single
(readline v8.0 enabled, extended help enabled)
Copyright (C) 2000-2018 The PARI Group
PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY
WHATSOEVER.
Type ? for help, \q to quit.
Type ?17 for how to get moral (and possibly technical) support.
parisize = 8000000, primelimit = 500000
? A=[a,6,7;a,-8,9;3,-9,a]
%1 =
[a 6 7]
[a -8 9]
[3 -9 a]
? polroots(matdet(A))
%2 = [-4.2545599189776995286102380535693524985 + 0.E-38*I, 5.5402742046919852428959523392836382128 + 0.E-38*I]~
? a=5.54;eval(matdet(A))
%3 = 0.037599999999999999999999999999999999957
? a=5.54027;eval(matdet(A))
%4 = 0.00057657940000000000000000000000000082196
? a=5.54027420469;eval(matdet(A))
%5 = 2.7223174805459999999999999809257144185 E-10
?
As you see, if I use more decimal digits for the value of the root, the determinant becomes nearer to $0$.
The approximation is not really good when you use $5.54$.
Just solve the following equation. $$a\cdot(-8)\cdot a+3\cdot6\cdot9+7\cdot a\cdot(-9)-3\cdot(-8)\cdot7-a\cdot(-9)\cdot9-a\cdot a\cdot6=0.$$ I got $$7a^2-9a-165=0,$$ which gives $$\left\{\frac{9+\sqrt{4701}}{14},\frac{9-\sqrt{4701}}{14}\right\}.$$ Now, if you'substitute these values, you'll get that the determinat is equal to $0$.
You got that $\det A\neq0$ because you took an approximated values of $a$.