Skip to content

Commit

Permalink
Add start of solutions to 3D
Browse files Browse the repository at this point in the history
  • Loading branch information
triangle-man committed Mar 28, 2024
1 parent 08538ff commit 3c0400a
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 6 deletions.
53 changes: 53 additions & 0 deletions exercises/axler-3d.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Exercises from Axler 3.C

1, 2, 6, 9, 18, 20

## Question 1

Suppose $T\in\mathcal{L}(V, w)$ is invertible. Show that $T^{-1}$ is
invertible and $(T^{-1})^{-1} = T$.

### Answer

When asked to show that something has a certain property, it's often
best to go back to the definition of that property. A linear map
$R:V\to W$ is invertible (this is definition 3.59) if there exists an
$S:W\to V$ such that $RS$ is the identity on $W$ and $SR$ is the
identity on $V$.

So, in order to show that some linear map (say $T^{-1}$) is
invertible, we must exhibit another linear map with the required
properties.

The obvious candidate for an inverse of $T^{-1}$ is $T$. Let's check
whether it is. We need to check that $T^{-1}T$ is the inverse on $V$
and that $TT^{-1}$ is the inverse on $W$. And indeed they are --
because _those_ conditions are precisely the meaning of $T^{-1}$
(which we are assured exists by the question).

## Question 2

Suppose $T\in \mathcal{L}(U, V)$ and $S\in \mathcal{L}(V, W)$ are both
invertible. Prove that $ST$ is invertible and that $(ST)^{-1} =
T^{-1}S^{-1}$.

### Answer

To prove that something is invertible we must exhibit its
inverse. Fortunately, the question has told us what the inverse is, so
what we need to do is check that it does in fact satisfy the
conditions for being an inverse.

That is, we need to show: (1) that $\bigl(ST\bigr) (\bigl
T^{-1}S^{-1}\bigr)$ is the identity on $W$; and (2) that $(\bigl
T^{-1}S^{-1}\bigr) \bigl(ST\bigr)$ is the identity on $U$.

To show (1), note that composition of linear maps is associative --
that is, it doesn't matter where we put the parentheses. Thus, roughly
speaking, we can “cancel the inner $T$s” and then, having got rid of
those, “cancel the outer $S$s.”

More carefully, $ $\bigl(ST\bigr) (\bigl T^{-1}S^{-1}\bigr) = S(T
T^{-1})S^{-1}$ because composition is associative. And that is
$S\mathbf{1}_V S^{-1}$, which is $SS^{-1}$ which is
$\mathbf{1}_W$. The same argument works for (2).
19 changes: 13 additions & 6 deletions implementation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,17 @@ Using Numpy.

### Racket

Naive implementation, boxed floats.
1. `naive`: Boxed floats and generic numeric operations..
2. `naive-cons`: Replacing `struct` with a pair.
3. `flo`: Using floating-point * and + in the inner loop of matrix
multiply and flvectors. (But still safe.)

All on Apple M2.

| Device | s | ops/s |
|:-------------|-----:|----------:|
| `naive` | 39.4 | 426,272 |
| `naive-cons` | 26.9 | 623,688 |
| `flo` | 11.4 | 1,472,000 |
| `unsafe` | 5.23 | 3,208,000 |

| Device | s | ops/s |
|:-------------|------:|--------:|
| Intel i7 | | |
| Apple M1 Pro | | |
| Apple M2 | 39.36 | 426,272 |

0 comments on commit 3c0400a

Please sign in to comment.