orthogonal; work around plotly()
This commit is contained in:
@@ -355,9 +355,15 @@ The operator $f'(x)= g'(h(x)) h'(x)$ is a product of matrices.
|
||||
|
||||
### Computational differences with expressions from the chain rule
|
||||
|
||||
Of note here is the application of the chain rule to three (or more compositions):
|
||||
Of note here is the application of the chain rule to three (or more compositions) where $c:R^n \rightarrow R^j$, $b:R^j \rightarrow R^k$, and $a:R^k \rightarrow R^m$:
|
||||
|
||||
The derivative of $f(x) = a(x) b(x) c(x)$ can be expressed as
|
||||
If $f(x) = a(b(c(x)))$ then the derivative is:
|
||||
|
||||
$$
|
||||
f'(x) = a'(b(c(x))) b'(c(x)) c'(x),
|
||||
$$
|
||||
|
||||
which can be expressed as three matrix multiplications two ways:
|
||||
|
||||
$$
|
||||
f' = (a'b')c' \text{ or } f' = a'(b'c')
|
||||
@@ -380,7 +386,7 @@ Whereas computing from the right to left is first $jk1$ operations leaving a $j
|
||||
* left to right is $njk + nk$ = $nk \cdot (j + 1)$.
|
||||
* right to left is $jk + jn = j\cdot (k+n)$.
|
||||
|
||||
When $j=k$, say, we can compare and see the second is a factor less in terms of operations. This can be quite significant in higher dimensions, whereas the dimensions of calculus (where $n$ and $m$ are $3$ or less) it is not an issue.
|
||||
When $j=k$, say, we can compare and see the second is a factor less in terms of operations. This can be quite significant in higher dimensions.
|
||||
|
||||
|
||||
##### Example
|
||||
@@ -405,7 +411,7 @@ Whereas the relationship is changed when the first matrix is skinny and the last
|
||||
|
||||
----
|
||||
|
||||
In calculus, we have $n$ and $m$ are $1$,$2$,or $3$. But that need not be the case, especially if differentiation is over a parameter space.
|
||||
In calculus, we typically have $n$ and $m$ are $1$, $2$,or $3$. But that need not be the case, especially if differentiation is over a parameter space.
|
||||
|
||||
## Derivatives of matrix functions
|
||||
|
||||
@@ -546,7 +552,7 @@ Appropriate sizes for $A$, $B$, and $C$ are determined by the various products i
|
||||
|
||||
If $A$ is $m \times n$ and $B$ is $r \times s$, then since $BC$ is defined, $C$ has $s$ rows, and since $CA^T$ is defined, $C$ must have $n$ columns, as $A^T$ is $n \times m$, so $C$ must be $s\times n$. Checking this is correct on the other side, $A \times B$ would be size $mr \times ns$ and $\vec{C}$ would be size $sn$, so that product works, size wise.
|
||||
|
||||
The referred to notes have an explanation for this formula, but we confirm with an example with $m=n=2$ and $r=s=3$:
|
||||
The referred to notes have an explanation for this formula, but we only confirm it with an example using $m=n=2$ and $r=s=3$:
|
||||
|
||||
```{julia}
|
||||
@syms A[1:2, 1:2]::real B[1:3, 1:3]::real C[1:3, 1:2]::real
|
||||
|
||||
Reference in New Issue
Block a user