this post was submitted on 17 Sep 2024
301 points (98.4% liked)
xkcd
8791 readers
110 users here now
A community for a webcomic of romance, sarcasm, math, and language.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
that’s fair. i remember multivariate being a bit rough back in the day. i feel like a lot of the difficulty with it might be due to how many shortcuts are taken when explaining things in singlevariate analysis, since a fair number of core concepts and tools don’t translate super well into the multivariate case.
i think the worst offender is the idea of the derivative as “the slope”, since that makes it quite hard to guess what the multidimensional derivative should be, and it makes the notions of gradient and partial derivatives a bit suspect. but some of the ways they teach integration in singlevariate analysis also don’t translate super well.
i feel like with calculus a bit part of the difficulty is in building up the intuition about how things work and what things mean, but my experience has been that that’s not a huge part of calculus courses. knowing some of the history about differentials and infinitesimals can also help a bit too, since that’s how calculus was first done, and it helps to understand the notation as well.
i hope some of this helps, and feel free to ask if you have any questions about some of the concepts
It should be easy, it's just analysis but with an added dimension, basically. How is it so hard? How is it that the more I'm "learning" for that damn math exam the less I know? Why do I need it in the first place? Why have exams at all? I know what I know, and it's not like I'm learning anything by preparing for them. I hate exams so much, it's so stressful.
I doubt you have the answers to that, even if you did, they wouldn't really help. So let's ask something useful, since you're offering.
What the hell is a total derivative, and why is it suddenly the same as a tangential plane?
Why is the gradient just a collection of the first partial derivatives? How's a tuple of them any useful? Apparently it's showing the direction of steepest ascend or something? I don't get it.
I think a lot of the reason is that fields (the real numbers in this case) have some pretty lousy categorical properties, and you can't define a very nice additive and multiplicative structure on ℝ^n^ for n >3. So you end up having to deal with vector spaces instead of fields. i.e., you can't (in general) multiply or divide points in ℝ^n^ by other points in ℝ^n^, so you have way fewer tricks at your disposal. The other thing is that you don't have a way to order points in ℝ^n^, so nice things like the mean value property sort of disappear. There are a few other complications as well, but I think those are the big ones. It's a whole other beast than singlevariate analysis.
I feel like this is just an unfortunate part of learning math. I'm not really sure that feeling ever goes away, but it usually means you're making progress. My experience has been that the more math I learn, the more comfortable I get with the things I already know, and the more I realize how much is left to learn. So it feels like I only really know the "basic stuff" and continue to struggle with the "hard stuff". My advice would be to try to not be discouraged by it, although it's easier said than done.
Onto the more technical questions. I'll try to make things handwavey to hopefully make the "big picture" shine through a bit. I think analysis textbooks are a bit guilty of getting too wrapped up in the details and missing the forest for the trees (or however the saying goes).
The total derivative is basically just a way to turn calculus problems into linear algebra problems. I think it's best understood by first looking at the one dimensional case, and then trying to generalize it a bit to higher dimensions. The key idea is this:
Notice how in the 1-dimensional case this is just a "clever" way to rephrase that f'(x~0~) is the "instantaneous slope" of f at x~0~.
In higher dimensions, it no longer makes sense to approximate f with a straight line, because lines are 1-dimensional objects, whereas the domain/codomain of the function might not necessarily be 1-dimensional. However, it does still make sense to talk about the best linear approximation of f. A bit of linear algebra knowledge helps to make this idea clearer, but I'll try to do my best to explain it with as little linear algebra as I can. (But let me know if you want a more linear algebra heavy explanation.)
A higher dimensional linear function is (basically) just a matrix, and a matrix is basically just a way to (linearly) turn one vector into another vector. At a high level, you can think of a matrix as turning one copy of ℝ^m^ into another copy of ℝ^n^, possibly rotating/translating/scaling things in the process. (Compare this to the 1-dimensional case, where a 1 x 1 matrix is just a number, and multiplying by a a number "turns one copy of ℝ to another copy of ℝ", provided that number isn't 0.)
So, the total derivative is basically just a matrix that gives the best way to approximate a multivariable function f at a vector x~0~. And as you vary the input vectors, you end up tracing out a copy of ℝ^n^ for some n. i.e., you get an n-dimensional plane that corresponds to the "best" approximation for f. And "best approximation" is just a slightly less fancy way of saying "tangential".
I always found the gradient to be a bit confusing. But I think it helps to understand it best in terms of what it does, and not in terms of how it's defined. The "purpose" of the gradient is to let you compute the directional derivative. i.e., what is the derivative in the direction of a given vector v. So, lets use the notation
(∇f)(v) to denote the directional derivative of f, in the direction of v.
Let's consider the 3-dimensional case and write v = a~1~e~1~ + a~2~e~2~ + a~3~e~3~ for basis vectors e~i~ and real numbers a~i~.
Since "taking the derivative" is linear, we would expect to have
(∇f)(v) = (∇f)(a~1~e~1~ + a~2~e~2~ + a~3~e~3~) = a~1~(∇f)(e~1~) + a~2~(∇f)(e~2~) + a~3~(∇f)(e~3~).
In other words, we only need to compute the directional derivative of the basis vectors in order to figure out the gradient. That's pretty nice! Also, the derivative of ~f~ in the direction of e~i~ is exactly the partial derivative of f taken with respect to e~i~. Let's write f~i~ for the partial derivative with respect to e~i~ (just because I don't know how well Lemmy handles double subscripts). Then we can rewrite the above equation as
(∇f)(v) = = a~1~f~1~ + a~2~f~2~ + a~3~f~3~.
Now compare that with the dot product of the vectors (f~1~, f~2~, f~3~) and _v = (a~1~, a~2~, a~3~). It's exactly the same. So, the gradient can be defined in terms of taking the dot product of a vector with the partial derivatives. But I think that kind of loses a lot of the intuitive meaning of the gradient in the process.
I hope you found some of this helpful, and feel free to ask if you have any more questions/found something I said confusing.
Thanks for answering my frustrated questions, was a long day yesterday. I'll try to understand the deeper truths later, but I can already tell the matrix stuff goes over my head.
anytime. i’ve also had my fair share of long days studying analysis. and i feel like most of my time spent trying to learn analysis was spent fighting with the textbooks. i think the (ε,δ) stuff is to blame for that, but that’s a whole other topic.
anyways, i was thinking a bit more about the matrix stuff and i think i have a better explanation if you’re interested, since my previous one was probably a bit too abstract. i think it should honestly be criminal to teach multivariate analysis before linear algebra, since a lot of the purpose of multivariate analysis is to turn complicated problems into linear problems. but anyways, here’s the big picture:
you don’t really need to understand the ins and outs of matrices and be super familiar with them to get a sense of what the total derivative is, and how it should behave. for that purpose, here are some of the highlights of matrices and the total derivative:
Let A be an m x n matrix. Then:
So those are two ways to look at the total derivative: you can try to get a geometric understanding of what it does (approximate the function with the best fitting plane), or try to look at why it’s useful (turning harder problems into easier problems). But just to be clear, dealing with matrices is still hard, it’s just comparably a lot easier than dealing with random functions.