---
title: Problem set 1
heading: "Problem set 1: vectors and matrices"
eyebrow: A7 · Problem set 1
type: problems
---

::: hook
These problems use lessons 1 to 6: vectors and the dot product, linear combinations, circuit equations, matrices as transformations, and matrix multiplication. Draw a picture for the 2D ones before computing.
:::

::: pool
pick: 12

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

## Let $\mathbf{v} = (\given{a}, \given{b})$ and $\mathbf{w} = (\given{c}, \given{d})$.

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

### What is $\mathbf{v} \cdot \mathbf{w}$?

::: misses
- [any] $v_1w_1 + v_2w_2$.
:::
:::

::: part
answer: acos((a*c + b*d)/(sqrt(a^2 + b^2)*sqrt(c^2 + d^2)))*180/pi
tolerance: 0.5%

### What is the angle between them, in degrees?

::: misses
- [any] $\cos\theta = \frac{\mathbf{v}\cdot\mathbf{w}}{|\mathbf{v}||\mathbf{w}|}$.
:::
:::
:::

::: check
kind: parts
given: b1 = 5 | 7; b2 = 1 | -3

## Write $(\given{b1}, \given{b2})$ as $c(1, 1) + d(1, -1)$.

::: part
answer: (b1 + b2)/2

### What is $c$?

::: misses
- [any] Add the two component equations.
:::
:::

::: part
answer: (b1 - b2)/2

### What is $d$?

::: misses
- [any] Subtract them.
:::
:::
:::

::: check
kind: parts
given: k1 = 0.4 | 0.25; k2 = 0.1 | 0.5; V1 = 10 | 12; V2 = 5 | 20

## A linear circuit gives {k1} V out per volt of source 1 and {k2} V per volt of source 2.

::: part
answer: k1*V1 + k2*V2
unit: V

### What is the output with $V_1$ = {V1} V and $V_2$ = {V2} V?

::: misses
- [any] Superposition: $k_1V_1 + k_2V_2$.
:::
:::

::: part
answer: -k1*V1/k2
unit: V

### What $V_2$ would cancel source 1 completely, giving 0 V out?

::: misses
- [k1*V1/k2] The two contributions must have opposite signs.
- [any] Solve $k_1V_1 + k_2V_2 = 0$.
:::
:::
:::

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

## A source {Vs} V feeds node 1 through $R$; $R$ goes from node 1 to ground, $R$ from node 1 to node 2, and $R$ from node 2 to ground. All four resistors are {R} kΩ.

::: part
answer: 0.4*Vs
unit: V

### What is $v_1$?

::: misses
- [any] KCL at nodes 1 and 2: $3v_1 - v_2 = V_s$ and $-v_1 + 2v_2 = 0$, with conductances in units of $1/R$.
:::
:::

::: part
answer: 0.2*Vs
unit: V

### What is $v_2$?

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

::: check
kind: parts
given: t = 30 | 60 | 135; x = 2 | 3

## $R_\theta$ rotates the plane by {t}° counterclockwise.

::: part
answer: x*cos(t*pi/180)
tolerance: 0.5%

### What is the first component of $R_\theta(\given{x}, 0)$?

::: misses
- [any] The first column of $R_\theta$ is $(\cos\theta, \sin\theta)$.
:::
:::

::: part
answer: -sin(t*pi/180)
tolerance: 0.5%

### What is the top-right entry of $R_\theta$?

::: misses
- [sin(t*pi/180)] The second column is where $(0, 1)$ goes: $(-\sin\theta, \cos\theta)$.
- [any] Column 2 is the image of $(0, 1)$.
:::
:::
:::

::: check
kind: parts
given: s = 2 | 3; t = 0.5 | 1.5

## A matrix sends $(1, 0)$ to $(\given{s}, 0)$ and $(0, 1)$ to $(\given{t}, 1)$.

::: part
answer: s*1 + t*2

### Where does it send $(1, 2)$? Give the first component.

::: misses
- [any] $1 \times$ column 1 $+ 2 \times$ column 2.
:::
:::

::: part
answer: s

### By what factor does it scale areas?

::: misses
- [any] The determinant: $s \times 1 - t \times 0$.
:::
:::
:::

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

## $A = \begin{bmatrix}\given{a} & \given{b}\\\given{c} & \given{d}\end{bmatrix}$ and $B = \begin{bmatrix}0 & 1\\1 & 0\end{bmatrix}$.

::: part
answer: b

### What is the top-left entry of $AB$?

::: misses
- [c] $AB$ swaps $A$'s columns; $BA$ swaps its rows.
- [any] Row 1 of $A$ times column 1 of $B$.
:::
:::

::: part
answer: c

### What is the top-left entry of $BA$?

::: misses
- [any] Row 1 of $B$ times column 1 of $A$.
:::
:::
:::

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

## A series {R1} kΩ resistor is followed by a shunt {R2} kΩ resistor.

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

### What is $\mathcal{A}$ in the chain's transmission matrix?

::: misses
- [any] Multiply $\begin{bmatrix}1 & R_1\\0 & 1\end{bmatrix}\begin{bmatrix}1 & 0\\1/R_2 & 1\end{bmatrix}$.
:::
:::

::: part
answer: 1/((1 + R1/R2)^2 + R1/R2)
tolerance: 0.5%

### Two identical stages are cascaded, with the output open. What is the overall voltage gain?

::: misses
- [1/(1 + R1/R2)^2] That multiplies the single-stage gains, ignoring how stage 2 loads stage 1. The matrix product includes the loading.
- [any] Square the stage's matrix and take $1/\mathcal{A}$.
:::
:::
:::

::: check
kind: parts
given: n = 4 | 6; k = 2 | 3

## Powers of matrices.

::: part
answer: n

### What is the top-right entry of $\begin{bmatrix}1 & 1\\0 & 1\end{bmatrix}^{\given{n}}$?

::: misses
- [any] Each factor adds 1.
:::
:::

::: part
answer: k^n

### What is the top-left entry of $\begin{bmatrix}\given{k} & 0\\0 & 1\end{bmatrix}^{\given{n}}$?

::: misses
- [k*n] Diagonal entries multiply, so they're raised to the power.
- [any] $k^n$.
:::
:::
:::

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

## Vectors in 3D: $\mathbf{u} = (\given{a}, \given{b}, \given{c})$.

::: part
answer: sqrt(a^2 + b^2 + c^2)
tolerance: 0.5%

### What is $|\mathbf{u}|$?

::: misses
- [any] $\sqrt{u_1^2 + u_2^2 + u_3^2}$.
:::
:::

::: part
answer: a/sqrt(a^2 + b^2 + c^2)
tolerance: 0.5%

### What is the first component of the unit vector in its direction?

::: misses
- [any] Divide by the length.
:::
:::
:::

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

## The vectors $(1, k)$ and $(\given{p}, \given{q})$.

::: part
answer: q/p
tolerance: 0.5%

### For what $k$ do they span only a line?

::: misses
- [p/q] Upside down.
- [any] Make them parallel.
:::
:::

::: part
answer: -p/q
tolerance: 0.5%

### For what $k$ are they perpendicular?

::: misses
- [any] Set the dot product $p + kq$ to zero.
:::
:::
:::

::: check
kind: parts
given: a1 = 2 | 3; b1 = 1 | 2; c1 = 5 | 8; a2 = 1 | 4; b2 = 5 | 6; c2 = 10 | 7

## Solve $\given{a1}x + \given{b1}y = \given{c1}$, $\given{a2}x + \given{b2}y = \given{c2}$.

::: part
answer: (c1*b2 - b1*c2)/(a1*b2 - b1*a2)
tolerance: 0.5%

### What is $x$?

::: misses
- [any] Eliminate $y$, or use the 2 × 2 inverse.
:::
:::

::: part
answer: (a1*c2 - c1*a2)/(a1*b2 - b1*a2)
tolerance: 0.5%

### What is $y$?

::: misses
- [any] Eliminate $x$.
:::
:::
:::

::: check
kind: parts
given: a = 2 | 3; b = 1 | 2

## Find the angle between $(1, \given{a}, 0)$ and $(0, 1, \given{b})$.

::: part
answer: a
tolerance: 0.5%

### What is their dot product?

::: misses
- [any] Only the middle entries overlap.
:::
:::

::: part
answer: a/(sqrt(1 + a^2)*sqrt(1 + b^2))
tolerance: 0.5%

### What is $\cos\theta$?

::: misses
- [any] Divide the dot product by both lengths.
:::
:::
:::

::: check
kind: parts
given: s = 2 | 3 | 0.5

## $S = \begin{bmatrix}\given{s} & 0\\0 & 1\end{bmatrix}$ stretches $x$, and $R$ rotates by 90° counterclockwise.

::: part
answer: s
tolerance: 0.5%

### What is the $y$ coordinate of $RS(1, 0)$?

::: misses
- [1] $S$ acts first: $(1, 0) \to (s, 0)$, then $R$ turns it to $(0, s)$.
- [any] Apply the right-hand matrix first.
:::
:::

::: part
answer: -s
tolerance: 0.5%

### What is the $x$ coordinate of $SR(0, 1)$?

::: misses
- [-1] $R$ acts first, sending $(0, 1)$ to $(-1, 0)$; then $S$ stretches it.
- [any] Rotate, then stretch.
:::
:::
:::

::: check
kind: parts
given: R = 1 | 2; Y = 0.5 | 1

## Two identical sections, each {R} kΩ in series then {Y} mS in shunt, are cascaded.

::: part
answer: (1 + R*Y)^2 + R*Y
tolerance: 0.5%

### What is $\mathcal{A}$ for the pair?

::: misses
- [(1 + R*Y)^2] The off-diagonal entries contribute too: $\mathcal{B}\mathcal{C} = RY$.
- [any] Square $\begin{bmatrix}1 + RY & R\\Y & 1\end{bmatrix}$ and read the top-left entry.
:::
:::

::: part
answer: 1/((1 + R*Y)^2 + R*Y)
tolerance: 0.5%

### What is the open-circuit gain?

::: misses
- [1/(1 + R*Y)^2] The second section loads the first, so the gains don't simply multiply.
- [any] $1/\mathcal{A}$.
:::
:::
:::
:::
