# Is there an easy way for a person to compute the determinant of an arbitrary matrix?

I'm having a tough time proving statements that involve the determinant of an arbitrary matrix and was wondering if there is just an easier way to compute it or some simpler equivalent definition for it. Just to give an example:

Let $$K$$ be a field, let $$\lambda,a_0,a_1 \dots a_n \in K$$ and $$n \in \mathbb{N}$$. Prove that $$A= \begin {pmatrix} \lambda &0 &0 &\dots & a_0 \\ -1 & \lambda &0 & \dots &a_1 \\0 &-1&\lambda &\dots& a_2 \\ \vdots & \dots & \dots & \dots &a_n\end{pmatrix}\in K^{(n+1)\times(n+1)}, \det(A)= a_n\lambda^n+\dots+ a_2\lambda^2+a_1\lambda+a_0$$

I have zero clue how I can go about this and the definition of the determinant is not very intuitive . My best guess was using the Laplace expansion so that $$n+1 \times n+1$$ matrix is not worrysome so that I can deal with the submatrix but I'm not sure where I can go from there. I would appreciate tips on how I should approach these proofs. (Also I would appreciate some help regarding the example problem as well).

• It looks like it be done by induction and a suitable Laplace expansion Jan 28 at 21:08
• I am very sure that this has been asked here before. Jan 28 at 21:18
• Your example is quite bad. A companion matrix is anything but arbitrary. Jan 28 at 22:19

"Arbitrary matrix" is misleading, and the problem you have isn't as hard.

Just expand the matrix along the first row,then $$\det = \lambda \det (\text{the Right Down} (n-1)\times (n-1) \text{ minor}) + (-1)^{n+2}a_0\cdot (\text{An Upper Triangular}).$$

$$\text{The right down} (n-1)\times (n-1) \text{minor}$$ can be computed by induction.

As just a user has pointed out, the matrix you seem to be struggling with is not at all representative of general matrices. Here's an answer to your title question ("How do I compute the determinant of an arbitrary matrix?"), drawing (lightly) from Wikipedia.

Linear algebra courses often teach Laplace expansion, because it is amenable to the sort of highly structured matrices you see in your question. In general, Laplace expansion is extremely inefficient, taking time $$O(n!)$$. The best known algorithm for computing determinants takes no longer than matrix multiplication, which is conjecturally $$O(n^2\cdot\mathrm{polylog}(n))$$ (but current technology requires $$O(n^{2.373})$$). Unfortunately, those highly efficient techniques rely on complicated computation schemes that are impractical for computation by hand.

A simple yet efficient technique is Gaussian elimination, which takes time $$O(n^3)$$. Perform RREF, making note of each time you swap rows or rescale a row to get a pivot of $$1$$. The $$j$$th time you swap rows, let those rows be separated by $$a_j$$. Likewise, call the factors used in rescaling $$(f_1,f_2,\dots)$$. If the end result is rank-deficient, then the determinant is $$0$$. Otherwise, the determinant is $$(-1)^{\sum_j{a_j}}\prod_k{f_k^{-1}}$$.

The downside to Gaussian elimination is that it can be tricky to analyze for families of matrices (like "companion matrices"), and is not numerically stable. If you have only approximate matrices (or hate the long fractions that appear in Gaussian elimination), consider the Bareiss variant instead.