ΘρϵηΠατπ

directional derivative
Let f:ℝn→ℝ and let a,v∈ℝn, then the directional derivative of f at a along v is defined as
∇vf(a):=limh→0⁡f(a+hv)−f(a)h
Partial Derivative
Let f:ℝn→ℝ and let a∈ℝn. The partial derivative with respect to xi is:
∂∂xif(a):=∇eif(a)
Frozen Function
Suppose that f:ℝn→ℝ and a∈ℝn then we can define a new function fi,a:ℝ→ℝ by fi,a(h):=f(a+hei).

The frozen function get's it's name because it can be thought of by taking the sample point a and then freezing in all directions except for along the i-th component of the input for f

Partial Derivative becomes frozen function derivative
∂f∂xi(a)=ddh[fi,a(h)]
TODO
Todo
Consider the function f(x,y,z)=x2+y2+z2, and the point (a1,a2,a3)∈ℝ3 then show that fy,a(h) equals the function g(x)=a12+(x)2+a32
Let's start by looking at the definition of f2,a(h)=f(a+he2) now recall that e2=(0,1,0), so that f(a+he2)=f((a1,a2,a3)+(0,h,0))=f(a1,a2+h,a3)=(a1)2+(a2+h)2+(a3)2
Todo
compute the partial derivative with resepct to y of f(x,y,z)=x2+y2+z2
Leaving x and z as constants, and evaluating the derivative as f(x,y,z)=C+y2+C, using the sum rule and the power rule, the derivative becomes ∂∂yf(x,y,z)=2y
Gradient
The gradient of a function f:ℝn→R at the point p is defined as ∇f(p):=(∂f∂(x1)(p),∂f∂(x2)(p),…,∂f∂(xn)(p))
Todo
Suppose we have the fnction f(x,y)=sin⁡(x), and (p1,p2)∈ℝ2 show that ∇f(p)=(cos⁡(p1),0)
By definition ∇f(p)=(∂f∂x1(p),∂f∂x2(p)). Since we know that ∂f∂x1=ddh(f1,p(h)), and we know that f1,p(h)=f(p+he1) since he1=(h,0) so p=(p1,p2) so p+he1=(p1+h,p2) so then f(p+he1)=sin⁡(p1+h), evaluating the limit from the directional derivative, it evaluates to cos⁡(p1)

we will show that ∂f∂x2(p)=0, we know that f2,p(h)=f(p+he2)=cos⁡(p1) and thus it is a constant funtion, this implies tha directional derivative is 0

Therefore we can se that ∇f(p)=(cos⁡(p1),0)

differentaibility
a function f:A→ℝm with A⊆ℝn is differentiable at the point a∈ℝn if there exists a linear transformation T:ℝn→ℝm such that
limx→a⁡‖f(x)−(f(a)+T(x−a))‖‖x−a‖=0
Quadratic Function is Differentiable at a Point
Let f:ℝ2→ℝ be given by f(x,y)=x2+y2. Show that f is differentiable at a=(1,−1).
Define T:ℝ2→ℝ by T(h,k)=2h−2k. This is a linear transformation. For (x,y)∈ℝ2, write (h,k)=(x,y)−(1,−1)=(x−1,y+1). Then f(x,y)−(f(1,−1)+T(h,k))=x2+y2−(2+2(x−1)−2(y+1))=(x−1)2+(y+1)2=‖(h,k)‖2. Therefore |f(x,y)−(f(1,−1)+T((x,y)−(1,−1)))|‖(x,y)−(1,−1)‖=‖(x,y)−(1,−1)‖. As (x,y)→(1,−1), the right side tends to 0. Hence f is differentiable at (1,−1).
Euclidean Norm is Not Differentiable at the Origin
Let f:ℝ2→ℝ be the Euclidean norm function f(x,y)=‖(x,y)‖. Show that f is not differentiable at (0,0).
Suppose for contradiction that f is differentiable at (0,0). Then there exists a linear transformation T:ℝ2→ℝ such that lim(x,y)→(0,0)⁡|‖(x,y)‖−T(x,y)|‖(x,y)‖=0. Taking points (t,0) with t>0, we get 0=limt→0+⁡|t−T(t,0)|t=|1−T(1,0)|, so T(1,0)=1. Taking points (t,0) with t<0, we get 0=limt→0−⁡|−t−T(t,0)|−t=|1+T(1,0)|, so T(1,0)=−1. This is impossible. Therefore no such linear transformation T exists, and f is not differentiable at (0,0).
continuous partials implies differentiability
If all the partial derivatives of a function exist in a neighborhood of a point x0 and are continuous at the point x0, then the function is differentiable at that point x0
ToDo
Derivative is Unique
Suppose that f:ℝn→ℝm is differentiable at a∈ℝn. Then there is a unique linear transformation T:ℝn→ℝm such that limh→0⁡|f(a+h)−f(a)−T(h)||h|=0. This linear transformation is denoted Df(a).
Derivative at a Point
Suppose that f:ℝn→ℝm is differentiable at a∈ℝn. The derivative of f at a, denoted Df(a), is the unique linear transformation T:ℝn→ℝm from the derivative uniqueness theorem.

Thus Df(a) is not a number in general. It is a linear map that takes a small displacement h∈ℝn and returns the best linear approximation to the change f(a+h)−f(a).

Derivative of the Identity Function
Let idℝn⁡:ℝn→ℝn be the identity function. For every a∈ℝn, Didℝn⁡(a)=idℝn⁡. Equivalently, for every v∈ℝn, Didℝn⁡(a)(v)=v.
Let T=idℝn⁡. Then T is a linear transformation. For every h≠0, ‖idℝn⁡(a+h)−idℝn⁡(a)−T(h)‖‖h‖=‖(a+h)−a−h‖‖h‖=0. Therefore T satisfies the defining limit for the derivative of idℝn⁡ at a. By derivative uniqueness, Didℝn⁡(a)=idℝn⁡. Applying both sides to v gives Didℝn⁡(a)(v)=v.
Derivative of Squared Norm
Let S:ℝn→ℝ,S(x)=x⋅x. Show that S is differentiable at every a∈ℝn, and that for every v∈ℝn, DS(a)(v)=2a⋅v.
Fix a∈ℝn. Define T:ℝn→ℝ,T(h)=2a⋅h. This is a linear transformation. For h∈ℝn, S(a+h)−S(a)−T(h)=(a+h)⋅(a+h)−a⋅a−2a⋅h. Expanding with the distributivity of the dot product and symmetry of the dot product gives S(a+h)−S(a)−T(h)=h⋅h. Therefore |S(a+h)−S(a)−T(h)|‖h‖=|h⋅h|‖h‖=‖h‖→0 as h→0. Thus T satisfies the defining limit for the derivative of S at a. By the definition of derivative at a point, DS(a)=T. Applying both sides to v gives DS(a)(v)=2a⋅v.
Jacobian Matrix
If f:ℝn→ℝm is differentiable at a, then Df(a) is a linear transformation ℝn→ℝm. Its matrix with respect to the standard bases En and Em is called the Jacobian matrix of f at a, and is denoted [Df(a)]Em←En. The notation f′(a) is also used for this matrix, but Df(a) itself denotes the derivative as a linear transformation.
Jacobian Entries are Partial Derivatives
Let f:ℝn→ℝm be differentiable at a, and write f=(f1,…,fm). Then the i,j-entry of the Jacobian matrix is the j-th partial derivative of the i-th component: ([Df(a)]Em←En)i,j=Djfi(a). Equivalently, [Df(a)]Em←En=[∂f1∂x1(a)∂f1∂x2(a)⋯∂f1∂xn(a)∂f2∂x1(a)∂f2∂x2(a)⋯∂f2∂xn(a)⋮⋮⋱⋮∂fm∂x1(a)∂fm∂x2(a)⋯∂fm∂xn(a)].
Let T=Df(a). By the standard matrix theorem for linear transformations, the j-th column of [T]Em←En is T(ej), where ej is the j-th vector in the standard basis of ℝn. Therefore ([Df(a)]Em←En)i,j=(T(ej))i. Since T is the derivative of f at a, f(a+tej)=f(a)+T(tej)+r(t),‖r(t)‖|t|→0 as t→0. Taking the i-th component and using the linearity of T, fi(a+tej)−fi(a)t=(T(ej))i+ri(t)t. The final term tends to 0, so the limit on the left exists and equals (T(ej))i. By the definition of partial derivative, that limit is Djfi(a). Hence Djfi(a)=([Df(a)]Em←En)i,j. Since this holds for every i and every j, the displayed matrix formula follows.
Differentiability Implies Continuity
If f:ℝn→ℝm is differentiable at a, then f is continuous at a.
Chain Rule for Total Derivatives
Suppose that f:ℝn→ℝm is differentiable at a, and g:ℝm→ℝp is differentiable at f(a). Then the composition g∘f is differentiable at a, and D(g∘f)(a)=Dg(f(a))∘Df(a). Equivalently, [D(g∘f)(a)]Ep←En=[Dg(f(a))]Ep←Em[Df(a)]Em←En.
Basic Derivative Rules in Euclidean Space
The following derivative rules hold:
  • If f:ℝn→ℝm is constant, then Df(a)=0.
  • If f:ℝn→ℝm is linear, then Df(a)=f.
  • If f:ℝn→ℝm, then f is differentiable at a if and only if each component fi is differentiable at a, and Df(a)=(Df1(a),…,Dfm(a)).
  • If f,g:ℝn→ℝ are differentiable at a, then D(f+g)(a)=Df(a)+Dg(a).
  • If f,g:ℝn→ℝ are differentiable at a, then D(fg)(a)=g(a)Df(a)+f(a)Dg(a).
  • If g(a)≠0, then D(fg)(a)=g(a)Df(a)−f(a)Dg(a)g(a)2.
Mixed Partials Commute Under Continuity
If Di,jf and Dj,if are continuous on an open set containing a, then Di,jf(a)=Dj,if(a).
Higher-Order Partial Derivative
A partial derivative of order k is obtained by applying partial derivative operators k times in sequence. For example, Di,jf=Di(Djf) is a partial derivative of order 2.
C∞ Function
Interior Extremum has Zero Partials
Let A⊆ℝn. If f:A→ℝ has a maximum or minimum at a point a in the interior of A, and Dif(a) exists, then Dif(a)=0.
Matrix Norm
If A is an m×n matrix, its norm is |A|=∑i=1m∑j=1nai,j2.
Mean Value Inequality in Euclidean Space
Suppose that A⊆ℝn is open, f:A→ℝm is differentiable, and the line segment from a to b lies in A. If |Df(x)|≤M for every point x on that segment, then |f(b)−f(a)|≤M|b−a|.
Continuously Differentiable iff Continuous Partials
A function f:ℝn→ℝm is continuously differentiable on an open set A if and only if all partial derivatives Djfi exist and are continuous on A. In this case the Jacobian matrix is [Df(x)]Em←En=(Djfi(x)).
In this statement, continuously differentiable means that f is differentiable at every point of A, and that the derivative map x↦Df(x) is continuous when Df(x) is represented by its Jacobian matrix.

First suppose f is continuously differentiable on A. Then f is differentiable at every x∈A, so Df(x) exists. The j-th partial derivative of the i-th component function is the i,j-entry of the Jacobian matrix: Djfi(x)=([Df(x)]Em←En)i,j. Since the matrix-valued function x↦[Df(x)]Em←En is continuous, each entry function x↦Djfi(x) is continuous. Thus all partial derivatives exist and are continuous on A.

Conversely, suppose all partial derivatives Djfi exist and are continuous on A. Fix a∈A. Since A is open, choose a small rectangle around a contained in A. Define a linear transformation Ta:ℝn→ℝm by Tah=(∑j=1nDjf1(a)hj,…,∑j=1nDjfm(a)hj). We show that Ta is the derivative of f at a.

Write h=(h1,…,hn), and for 0≤j≤n, set zj=a+(h1,…,hj,0,…,0). For each component fi, telescope the change from a to a+h: fi(a+h)−fi(a)=∑j=1n(fi(zj)−fi(zj−1)). Each summand changes only the j-th coordinate. By the one-variable mean value theorem applied along that coordinate segment, if hj≠0, there is a point ξj on the segment from zj−1 to zj such that fi(zj)−fi(zj−1)=Djfi(ξj)hj. If hj=0, the same formula holds with any point ξj on the segment.

Therefore fi(a+h)−fi(a)−∑j=1nDjfi(a)hj=∑j=1n(Djfi(ξj)−Djfi(a))hj. Since each Djfi is continuous at a, the differences Djfi(ξj)−Djfi(a) go to 0 as h→0. Hence |f(a+h)−f(a)−Tah||h|→0. By the definition of differentiability, f is differentiable at a, with Df(a)=Ta.

Since a∈A was arbitrary, f is differentiable on A. The matrix of Ta is exactly (Djfi(a)), so [Df(a)]Em←En=(Djfi(a)). The entries of this matrix are continuous functions of a, so the Jacobian matrix varies continuously on A. Thus f is continuously differentiable on A.

Projection Functions are Continuously Differentiable
Each projection function πi:ℝn→ℝ is continuously differentiable.
For the i-th projection function, Djπi(x)={1j=i,0j≠i. These partial derivatives exist and are constant, hence continuous. Therefore πi is continuously differentiable by the continuous partials characterization.
Componentwise Continuously Differentiable Map
Let A⊆ℝn be open. If f1,…,fm:A→ℝ are continuously differentiable, then the function f:A→ℝm defined by f(x)=(f1(x),…,fm(x)) is continuously differentiable.
By the definition of component functions, the component functions of f are f1,…,fm. Each fi is continuously differentiable, so all partial derivatives Djfi exist and are continuous on A. Therefore f is continuously differentiable by the continuous partials characterization.
Derivative of the Vector Scalar Division Map
Let Q:ℝm×(ℝ∖{0})→ℝm,Q(y,t)=yt. If y∈ℝm, t≠0, u∈ℝm, and s∈ℝ, then DQ(y,t)(u,s)=ut−st2y.
Write y=(y1,…,ym). The component functions of Q are Qi(y,t)=yit for 1≤i≤m. For 1≤j≤m, ∂Qi∂yj(y,t)={1t,i=j,0,i≠j, and ∂Qi∂t(y,t)=−yit2. These partial derivatives are continuous wherever t≠0. Therefore, by the continuous partials characterization, Q is differentiable at (y,t).

By the Jacobian entries are partial derivatives corollary, the Jacobian matrix of Q at (y,t), with input coordinates ordered as y1,…,ym,t, is [DQ(y,t)]Em←Em+1=[1t0⋯0−y1t201t⋯0−y2t2⋮⋮⋱⋮⋮00⋯1t−ymt2].

Applying this matrix to the displacement (u,s)=(u1,…,um,s) gives DQ(y,t)(u,s)=(u1t−sy1t2,…,umt−symt2)=ut−st2y.
Inverse Function Theorem
Suppose that f:ℝn→ℝn is continuously differentiable in an open set containing a, and that the determinant of the Jacobian matrix is nonzero: det⁡[Df(a)]E≠0. Then there are open sets U and V with a∈U, f(a)∈V, such that f:U→V is one-to-one, onto, and has a continuously differentiable inverse. Moreover, [D(f−1)(y)]E=([Df(f−1(y))]E)−1. If f is C∞, then f−1 is C∞.
Let A=[Df(a)]E. Since det⁡A≠0, A is an invertible matrix. Composing f with the affine change of variables x↦A−1(f(x)−f(a))+a reduces the proof to the case f(a)=a and [Df(a)]E=In. After proving the theorem in this normalized case, composing back with the affine maps gives the original statement.

In the normalized case, continuity of the Jacobian matrix gives a closed rectangle R with a in its interior such that [Df(x)]E stays close to In on R. Applying the mean value inequality to x↦f(x)−x, after shrinking R if needed, gives |(f(x)−x)−(f(y)−y)|≤12|x−y| for all x,y∈R. Therefore |f(x)−f(y)|≥12|x−y|, so f is one-to-one on R.

The boundary of R is compact, and f(a) is not in the image of that boundary. Hence there is an open ball V around f(a) such that every z∈V is closer to f(a) than to any value f(x) with x on the boundary of R.

Fix z∈V, and define Φz(x)=|z−f(x)|2 on R. Since R is a compact closed rectangle and Φz is continuous, the extreme value theorem gives a point where Φz is minimized. The choice of V prevents this minimum from occurring on the boundary, so the minimum occurs at an interior point x.

By the interior extremum theorem, all partial derivatives of Φz vanish at x. Written in matrix form, this says (z−f(x))T[Df(x)]E=0. Since [Df(x)]E is close to In, it is invertible. Therefore z−f(x)=0, so z=f(x). This proves that every z∈V has a preimage in the interior of R. Together with injectivity, this gives a local inverse f−1:V→U, where U=f−1(V)∩int⁡(R).

The estimate |f(x)−f(y)|≥12|x−y| implies |f−1(z1)−f−1(z2)|≤2|z1−z2|, so f−1 is continuous.

Let z=f(x)∈V. Since f is differentiable at x, f(x+h)=f(x)+[Df(x)]Eh+r(h),|r(h)||h|→0. Using the continuity estimate for f−1, this remainder identity implies [D(f−1)(z)]E=([Df(x)]E)−1=([Df(f−1(z))]E)−1. Since the Jacobian matrix of f is continuous and matrix inversion is continuous on invertible matrices, f−1 is continuously differentiable. If f is C∞, repeated differentiation of f(f−1(z))=z shows inductively that f−1 is C∞.

Implicit Function Theorem
Suppose that F:ℝn+m→ℝm is continuously differentiable near (a,b), F(a,b)=0, and the m×m matrix of partial derivatives of F with respect to the last m variables is invertible at (a,b). Then near (a,b), the equation F(x,y)=0 uniquely determines y as a continuously differentiable function y=g(x). If F is C∞, then g is C∞.
Let B=[∂Fi∂yj(a,b)]1≤i,j≤m. By hypothesis, B is an invertible matrix. Define H:ℝn+m→ℝn+m,H(x,y)=(x,F(x,y)). Since F is continuously differentiable near (a,b), there is an open set U containing (a,b) on which F is continuously differentiable. On U, the first n component functions of H are projection functions, and the last m component functions are the component functions of F. Hence H is continuously differentiable on U by the componentwise continuously differentiable map theorem.

The derivative matrix of H at (a,b), written in the x-variables followed by the y-variables, has block form H′(a,b)=[In0CB], where C is the matrix of partial derivatives of F with respect to the x-variables. This block matrix is invertible, with inverse [In0−B−1CB−1]. Indeed, by block matrix multiplication, [In0CB][In0−B−1CB−1]=[In0C−BB−1CBB−1]=[In00Im], and the product in the opposite order is also the identity matrix.

By the inverse function theorem, after restricting to open neighborhoods, H has a continuously differentiable inverse. Write this inverse as H−1(s,t)=(s,k(s,t)). The first component must be s, because the first component of H(x,y) is x.

Define g(s)=k(s,0). Then H(s,g(s))=(s,0), so F(s,g(s))=0.

Conversely, if F(s,y)=0 for (s,y) in the chosen neighborhood, then H(s,y)=(s,0). Since H is one-to-one on that neighborhood, (s,y)=H−1(s,0)=(s,g(s)). Hence y=g(s), proving uniqueness.

Since g is obtained from the continuously differentiable inverse H−1, it is continuously differentiable. If F is C∞, then H is C∞, so H−1 is C∞ by the smooth part of the inverse function theorem. Therefore g is C∞.

Lagrange Multiplier Condition
If g:A→ℝp has full rank p on g−1(0), and f:A→ℝ has a constrained extremum at a∈g−1(0), then there are scalars λ1,…,λp such that df(a)=∑i=1pλidgi(a).