confusion about the chain rule
DOCX · 46.4 KB
Open DOCX file
Short note by Phil dated 3.26.16 that starts from a dome example, x'3 = sqrt(R^2 - x1^2 - x2^2), where the Jacobian product RS does not equal the identity. It states what the chain rule actually says and separates the square case, where RS = SR = 1, from the tall full-rank case. In the tall case S is only a left inverse (for example (R^T R)^-1 R^T), so SR = 1 but RS is not 1, and he explains this using the manifold in x'-space.
AI-written summary; may contain errors.
Extracted text (machine-read; may contain errors)
Confusion about what the Chain Rule says PhL 3.26.16
See summary at the end.
Motivation: In considering this example of a tall R matrix,
x'1 = x1
x'2 = x2
x'3 = (R2- (x1)2-(x2)2)1/2 = height of dome at (x1,x2) // forward xform
x1 = x'1
x2 = x'2 // inverse xform
I find by explicit calculation that
When I write out the RS product I get
RijSjk = (∂x'i/∂xj) (∂xj/∂x'k) = ≠ δik RS ≠ 1
I am surprised, because I thought I had this theorem going
Theorem: The Chain Rule says = δik
____________________________________________________________________________
So how do I explain that "the chain rule fails"? Totally new to me. How do you prove the chain rule in the first place? Bucks do a very long proof starting on page 250 for the case that you have the same number of variables on each side. It is a non-trivial proof.
Wiki suggests that the chain rule should be valid in the non-square situation as well.
What exactly is the "chain rule" ?
The "chain rule" is a statement about the derivative of a concatenation of two functions for example
f(x') x' = F(x) f(F(x)) = (f o F)(x)
∂fk(x')/∂xi = Σj
Now suppose you take this particular function
f(x') = x' fk(x') = x'k
Then the chain rule above says
∂x'k/∂xi = Σj = = a triviality, no δ is involved here
On the other hand consider ( we are assuming that x = F-1(x') exists _
f(x) x = F-1(x') f(F-1(x')) = (f o F-1)(x')
∂fk(x)/∂x'i = Σj
Now suppose you take this particular function
f(x) = x fk(x) = xk
Then the chain rule above says
∂xk/∂x'i = Σj
or
∂xk/∂x'i = = a triviality, no δ is involved here.
Consider a third case. In the above "other hand", suppose I give f(x) the name x'(x). Then
∂x'k(x)/∂x'i = Σj
But just giving f(x) this artificial name does not mean ∂x'k(x)/∂x'i = δki.
So where am I getting the idea that you should have
= δik ??
OK, this is not an obvious fact. However, it is true in certain cases.
The way I write this in tensor doc is
Σk = = δi,j
I refer to this as "the chain rule" but I think that is a mistake.
Case 1: (tensor doc) If R is a square matrix of full rank, then its inverse S exists, and RS = SR = 1.
In this case, you may conclude that
= δik or RijSjk = δik
= δik or SijRjk = δik
Saying that x' = F(x) is invertible means that x' = Rx is invertible at the microscale and so SR=RS=1.
Case 2: (tall R matrix) If R is full rank,
it is possible to find a left inverse S such that SR = 1
this S is generally not unique
one S which works is S = (RTR)-1RT. We know (RTR)-1 exists if R is full rank, see elsewhere.
it is not possible to find a right inverse S such that RS = 1
The following is not obvious to me: Suppose you take a sample tall R matrix problem like that above and you compute S as I have done.
Question 1: Do you know that this S is a left inverse for R? (it was in my example)
Suppose the answer is yes. You could then conclude that:
Σj=1m = δik or SijRjk = δik // always true
Σj=1n = δik or RijSjk = δik // never true
In this scenario, it is the equation whose sum has the larger number of terms that is true.
Answer to question 1. I think we do know this. Consider
If you start with x and go over to x' on the right, you should be able to map that vector back to x as shown. Points on the manifold M in x'-space always have a unique inverse due to assumptions made about the mapping which I have downplayed. The mapping is 1-to-1 from a domain U in x-space to a domain V on the manifold M in x'-space, and that is why it has a unique inverse. For each mapping, I show both the full map, and the local linear map. Combining the two local maps you get
dx = Sdx' = S(Rdx) = SR dx = dx.
This equation SR dx = dx is valid for every dx in x-space. In particular, this is valid for x = dx(1,0) and x = dx(0,1) so it is valid for all basis elements in x-space. Therefore, SR dx = dx SR = 1 as a matrix.
If you try it in the reverse order, you would be claiming that RS dx' = dx' , but this is only true for dx' which lie on the manifold M. Since this equation RS dx' = dx' is not valid for a full set of basis vectors in x'-space, you cannot conclude that RS = 1. In our example, there are at most two basis vectors lying on the manifold, but you need the equation to be true for all three basis vectors.
Therefore, if you find a matrix S from your calculation of S, you are saying dx = Sdx' for that S, and by the above argument, you have SR = 1 so yes, the S you compute must be a left inverse of R, as it was in my simple example.
Summary regarding S and R and the "chain rule identity" :
Case 1: (tensor doc) If R is a square matrix of full rank, then its inverse S exists, and RS = SR = 1.
In this case, you may conclude that
= δik or RijSjk = δik
= δik or SijRjk = δik
Saying that x' = F(x) is invertible means that dx' = Rdx is invertible at the microscale and so SR=RS=1.
Case 2: (tall R matrix) If R is full rank,
it is possible to find a left inverse S such that SR = 1
this S is generally not unique
there is no trivial formula that I know of for computing all possible S
one S which works is S = (RTR)-1RT. We know (RTR)-1 exists if R is full rank, see elsewhere.
if you "compute S" from dx = Sdx' (x = F-1(x')), the S you get is such a left inverse and SR = 1.
it is not possible to find a right inverse S such that RS = 1
in this Case 2 we conclude that
Σj=1m = δik or SijRjk = δik m terms in sum
Σj=1n ≠ δik or RijSjk ≠ δik n terms in sum
Concerning the last non-equation, think of the manifold in x'-space. Consider Sjk = . For this object to exist genuinely, you have to say how xj varies in x-space as you vary x'k in all directions in x'-space because all values of k are included in what I would call a chain rule sum. BUT no matter how you select coordinates in x'-space, there is at least one direction k for which you cannot vary x'k without leaving the manifold surface, and this is simply an undefined concept and corresponds to nothing in x-space.