---
title: Problem set 3
heading: "Problem set 3: solving linear systems"
eyebrow: A7 · Problem set 3
type: problems
---

::: hook
These problems use lessons 8 to 13: elimination, LU factorization, inverses and transposes, and solving $A\mathbf{x} = \mathbf{b}$ for circuits. Several of them are small enough to do by hand and big enough to show why nobody does the large ones by hand.
:::

::: pool
pick: 12

::: check
kind: parts
given: p = 2 | 4; q = 1 | 5; r = 2 | 3; c1 = 9 | 13; c2 = 7 | 11; c3 = 4 | 6

## Back-substitute: $\given{p}x + y + z = \given{c1}$, $\given{q}y + z = \given{c2}$, $\given{r}z = \given{c3}$.

::: part
answer: c3/r
tolerance: 0.5%

### What is $z$?

::: misses
- [any] The last equation alone.
:::
:::

::: part
answer: (c1 - (c2 - c3/r)/q - c3/r)/p
tolerance: 0.5%

### What is $x$?

::: misses
- [any] Find $y$ from the middle equation, then $x$ from the first.
:::
:::
:::

::: check
kind: parts
given: a = 2 | 5; b = 1 | 3; c = 4 | -10; d = 7 | 2

## Factor $A = \begin{bmatrix}\given{a} & \given{b}\\\given{c} & \given{d}\end{bmatrix} = LU$.

::: part
answer: c/a

### What is the multiplier $\ell_{21}$?

::: misses
- [a/c] Upside down.
- [any] Entry below the pivot over the pivot.
:::
:::

::: part
answer: d - c/a*b

### What is the second pivot $u_{22}$?

::: misses
- [any] $d - \ell_{21}b$.
:::
:::
:::

::: check
kind: parts
given: l = 3 | -2; u11 = 2 | 4; u12 = 1 | -1; u22 = 5 | 3; b1 = 4 | 6; b2 = 20 | -5

## Solve $LU\mathbf{x} = (\given{b1}, \given{b2})$ with $L = \begin{bmatrix}1 & 0\\\given{l} & 1\end{bmatrix}$, $U = \begin{bmatrix}\given{u11} & \given{u12}\\0 & \given{u22}\end{bmatrix}$.

::: part
answer: (b2 - l*b1)/u22
tolerance: 0.5%

### What is $x_2$?

::: misses
- [b2/u22] Forward-substitute first: $c_2 = b_2 - \ell b_1$.
- [any] $c_2 = b_2 - \ell c_1$, then $x_2 = c_2/u_{22}$.
:::
:::

::: part
answer: (b1 - u12*(b2 - l*b1)/u22)/u11
tolerance: 0.5%

### What is $x_1$?

::: misses
- [any] $x_1 = (c_1 - u_{12}x_2)/u_{11}$.
:::
:::
:::

::: check
kind: parts
given: n = 1000 | 3000 | 10000; F = 1 | 10

## A computer does {F} billion multiply-adds per second.

::: part
answer: n^3/3/(F*1e9)
unit: s
tolerance: 1%

### How long does it take to factor a {n} × {n} matrix?

::: misses
- [n^3/(F*1e9)] Factoring takes about $n^3/3$.
- [any] $\frac{n^3/3}{\text{rate}}$.
:::
:::

::: part
answer: n^2/(F*1e9)
unit: s
tolerance: 1%

### How long does each later solve take?

::: misses
- [any] About $n^2$ operations.
:::
:::
:::

::: check
kind: parts
given: a = 3 | 2; b = 1 | 5; c = 2 | 1; d = 4 | 3

## Let $A = \begin{bmatrix}\given{a} & \given{b}\\\given{c} & \given{d}\end{bmatrix}$.

::: part
answer: a*d - b*c

### What is its determinant?

::: misses
- [any] $ad - bc$.
:::
:::

::: part
answer: -c/(a*d - b*c)
tolerance: 0.5%

### What is the bottom-left entry of $A^{-1}$?

::: misses
- [c/(a*d - b*c)] Negate the off-diagonal entries.
- [any] $\frac{-c}{ad - bc}$.
:::
:::
:::

::: check
kind: parts
given: R1 = 2 | 1; R2 = 1 | 2; R3 = 1 | 3

## Resistors: {R1} kΩ from node 1 to ground, {R2} kΩ between nodes 1 and 2, {R3} kΩ from node 2 to ground. Work in mS and kΩ.

::: part
answer: 1/R1 + 1/R2
unit: mS
tolerance: 0.5%

### What is $G_{11}$, in mS?

::: misses
- [any] The sum of the conductances touching node 1.
:::
:::

::: part
answer: (1/R2)/((1/R1 + 1/R2)*(1/R2 + 1/R3) - 1/R2^2)
unit: V
tolerance: 0.5%

### 1 mA is injected into node 1. What is $v_2$?

::: misses
- [any] The off-diagonal entry of $G^{-1}$, in kΩ.
:::
:::
:::

::: check
kind: parts
given: e = 0.01 | 0.005 | 0.001 | 0.0005 | 0.0001 | 0.00001

## Eliminate below the first pivot of $\begin{bmatrix}\given{e} & 1\\1 & 1\end{bmatrix}$.

::: part
answer: 1/e

### Without row swaps, what multiplier is needed?

::: misses
- [e] The entry below divided by the pivot: $1/\given{e}$.
- [any] $\ell_{21} = a_{21}/a_{11}$.
:::
:::

::: part
answer: e

### With partial pivoting (swap so the larger entry is the pivot), what multiplier is needed?

::: misses
- [any] After the swap the pivot is 1 and the entry below is {e}.
:::
:::
:::

::: check
kind: parts
given: R = 1 | 2; Vs = 6 | 10

## In the ladder: $V_s$ = {Vs} V feeds node 1 through $R$, $2R$ goes from node 1 to ground, $R$ from node 1 to node 2, and $R$ from node 2 to ground; $R$ = {R} kΩ.

::: part
answer: Vs/2
unit: V
tolerance: 0.5%

### What is $v_1$?

::: misses
- [any] KCL in units of $1/R$: $2.5v_1 - v_2 = V_s$ and $-v_1 + 2v_2 = 0$.
:::
:::

::: part
answer: Vs/4
unit: V
tolerance: 0.5%

### What is $v_2$?

::: misses
- [any] $v_2 = v_1/2$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 3 | -1; c = 2 | 4; d = 3 | 5

## Let $A = \begin{bmatrix}\given{a} & \given{b}\\\given{c} & \given{d}\end{bmatrix}$.

::: part
answer: a*b + c*d

### What is the top-right entry of $A^TA$?

::: misses
- [a*c + b*d] That's $AA^T$. $A^TA$ dots the columns of $A$.
- [any] Column 1 of $A$ dotted with column 2.
:::
:::

::: part
answer: a*b + c*d

### What is the bottom-left entry of $A^TA$?

::: misses
- [any] $A^TA$ is symmetric.
:::
:::
:::

::: check
kind: parts
given: l = 2 | 5 | -3

## The elimination matrix $E = \begin{bmatrix}1 & 0\\-\given{l} & 1\end{bmatrix}$ subtracts {l} times row 1 from row 2.

::: part
answer: l

### What is the bottom-left entry of $E^{-1}$?

::: misses
- [-l] To undo a subtraction, add back.
- [any] $E^{-1}$ adds {l} times row 1 back.
:::
:::

::: part
answer: 1

### What is the determinant of $E$?

::: misses
- [any] It's triangular: multiply the diagonal.
:::
:::
:::

::: check
kind: parts
given: a = 2 | 4; b = 3 | -1; d = 5 | 2

## Invert the upper triangular $U = \begin{bmatrix}\given{a} & \given{b}\\0 & \given{d}\end{bmatrix}$.

::: part
answer: 1/a
tolerance: 0.5%

### What is the top-left entry of $U^{-1}$?

::: misses
- [any] $\frac{d}{ad}$.
:::
:::

::: part
answer: -b/(a*d)
tolerance: 0.5%

### What is the top-right entry?

::: misses
- [b/(a*d)] Negate the off-diagonal.
- [any] $\frac{-b}{ad - 0}$.
:::
:::
:::

::: check
kind: parts
given: p = 2 | 3; q = 3 | 5

## Let $A = \begin{bmatrix}1 & \given{p}\\\given{q} & k\end{bmatrix}$.

::: part
answer: p*q

### For what $k$ is $A$ singular?

::: misses
- [p/q] Set $k - pq = 0$.
- [any] Determinant zero.
:::
:::

::: part
answer: p*q + 1

### For what $k$ is $\det A = 1$?

::: misses
- [any] $k - pq = 1$.
:::
:::
:::

::: check
kind: parts
given: I = 1 | 3 | 5

## The ladder $G = \begin{bmatrix}2 & -1 & 0\\-1 & 2 & -1\\0 & -1 & 2\end{bmatrix}$ mS has {I} mA injected at node 2.

::: part
answer: I
unit: V
tolerance: 0.5%

### What is $v_2$?

::: misses
- [any] Column 2 of $G^{-1}$ is $\frac14(2, 4, 2)$.
:::
:::

::: part
answer: I/2
unit: V
tolerance: 0.5%

### What is $v_1$?

::: misses
- [any] By symmetry $v_1 = v_3$, and row 1 says $2v_1 = v_2$.
:::
:::
:::

::: check
kind: parts
given: a = 3 | 5; b = 1 | 2; c = 2 | 4; d = 4 | 6

## Take $A = \begin{bmatrix}\given{a} & \given{b}\\\given{c} & \given{d}\end{bmatrix}$.

::: part
answer: 1/(a*d - b*c)
tolerance: 0.5%

### What is $\det A^{-1}$?

::: misses
- [a*d - b*c] That's $\det A$; the inverse has the reciprocal.
- [any] $\det A^{-1} = 1/\det A$.
:::
:::

::: part
answer: a/(a*d - b*c)
tolerance: 0.5%

### What is the bottom-right entry of $A^{-1}$?

::: misses
- [d/(a*d - b*c)] The diagonal entries swap.
- [any] $\frac{1}{ad - bc}\begin{bmatrix}d & -b\\-c & a\end{bmatrix}$.
:::
:::
:::

::: check
kind: parts
given: g1 = 1 | 2; g2 = 0.5 | 3; g3 = 1 | 4

## A two-node network has $g_1$ = {g1} mS from node 1 to ground, $g_2$ = {g2} mS between the nodes and $g_3$ = {g3} mS from node 2 to ground.

::: part
answer: g2/((g1 + g2)*(g2 + g3) - g2^2)
unit: kΩ
tolerance: 0.5%

### How many volts appear at node 2 per milliamp injected at node 1?

::: misses
- [any] The (2, 1) entry of $G^{-1}$; by reciprocity it equals the (1, 2) entry.
:::
:::

::: part
answer: (g2 + g3)/((g1 + g2)*(g2 + g3) - g2^2)
unit: kΩ
tolerance: 0.5%

### What resistance does the network present at node 1?

::: misses
- [1/g1] The path through $g_2$ and $g_3$ is in parallel with $g_1$.
- [any] The (1, 1) entry of $G^{-1}$.
:::
:::
:::
:::
