# Determinants and Invertibility

Computer Science I · Algebra · https://tryals.app/learn/computer-science-i/determinants-and-invertibility

## One Number That Says a Lot

The **determinant** is a single number computed from a square matrix that captures essential transformation properties. For a $2 \times 2$ matrix $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$, it is defined by the formula:

$$\det = ad - bc$$

Geometrically, the determinant measures how the transformation **scales area** or volume. 

| Determinant Value | Geometric Meaning |
| --- | --- |
| $\det = 2$ | Doubles areas |
| $\det = 1$ | Preserves areas |
| $\det = 0$ | Flattens space to a line or point |
| **Negative** | Flips orientation like a mirror |

**Common pitfall:** Always compute $ad - bc$. Do not confuse this with $ab - cd$ or $ad + bc$.

## Invertibility and Systems

The single most important fact ties the determinant to matrix inverses: **a square matrix is invertible if and only if its determinant is nonzero.**

A **singular** matrix has a determinant of zero. It squashes space and loses information, meaning no inverse exists. This directly impacts linear systems:

$A\mathbf{x} = \mathbf{b}$ has a unique solution exactly when $\det A \neq 0$.

**Pitfall alert:** Reversing the invertibility rule is a major error. A **zero** determinant means NOT invertible (singular). A **nonzero** determinant guarantees an inverse exists.

## Practice questions

4 of this lesson's 9 practice questions, with answers. The full set is in the app.

### 1. Sort each 2x2 matrix by whether it is invertible (nonzero determinant).

**Answer:**

- Invertible: rows (1, 2) and (3, 4), rows (5, 0) and (0, 2)
- Singular: rows (2, 6) and (1, 3), rows (4, 4) and (1, 1)

**Why:** m1: 1*4 - 2*3 = -2 (nonzero, invertible). m3: 5*2 - 0 = 10 (invertible). m2: 2*3 - 6*1 = 0 and m4: 4*1 - 4*1 = 0 are both singular, their rows are proportional.

Page: https://tryals.app/practice/computer-science-i/determinants-and-invertibility/sort-each-2x2-matrix-by-whether-it-is-invertible-nonzero

### 2. A matrix has determinant 10⁻¹⁸ in double precision. Is it singular?

A. Unanswerable alone, since the determinant scales with the matrix
B. Yes, because double precision cannot represent values that small
C. No, since a non-zero determinant means invertible
D. Yes, since a determinant that small is indistinguishable from zero

**Answer:** A. Unanswerable alone, since the determinant scales with the matrix

**Why:** Scaling a 10×10 matrix by 0.1 multiplies its determinant by 10⁻¹⁰ without changing its invertibility at all, so the number carries no scale-free information. The condition number is the right instrument, and it also tells you how many digits of the answer to trust.

Page: https://tryals.app/practice/computer-science-i/determinants-and-invertibility/a-matrix-has-determinant-10-in-double-precision-is-it-singular

### 3. A determinant of exactly zero means a matrix is singular, but numerical code tests whether it is "close to zero". Why is the exact test unusable in practice?

A. Because determinants of large matrices cannot be computed exactly by any algorithm.
B. Because the exact test works, and the tolerance is included only for speed.
C. Because floating-point arithmetic rarely produces an exact zero.
D. Because a determinant close to zero means the matrix is invertible but slow to invert.

**Answer:** C. Because floating-point arithmetic rarely produces an exact zero.

**Why:** Rounding means a genuinely singular matrix computes to something like 1e-17 rather than 0, so an exact test declares it invertible and the code divides by that. A tolerance is necessary, and the determinant is a poor basis for one, scaling a 10×10 matrix by 2 multiplies it by 1024. Libraries use the condition number, which is scale-invariant and says how many digits to trust.

Page: https://tryals.app/practice/computer-science-i/determinants-and-invertibility/a-determinant-of-exactly-zero-means-a-matrix-is-singular-but

### 4. Select every statement that is TRUE about a 2x2 matrix with determinant 0.

A. Its rows are linearly dependent
B. It preserves all areas
C. It is not invertible
D. It has an inverse
E. It collapses the plane onto a line or point

**Answer:** A. Its rows are linearly dependent; C. It is not invertible; E. It collapses the plane onto a line or point

**Why:** Determinant 0 means singular: no inverse, dependent rows, and the plane is flattened onto a line or point (area scaled by 0). It certainly does not preserve areas or have an inverse.

Page: https://tryals.app/practice/computer-science-i/determinants-and-invertibility/select-every-statement-that-is-true-about-a-2x2-matrix-with
