We use the notation of the statement. Algebraic manipulations of dot products use Bilinearity and Symmetry of the Dot Product on R n \mathbb{R}^n R n , and ∥ λ v ∥ = ∣ λ ∣ ∥ v ∥ \lVert\lambda v\rVert=|\lambda|\lVert v\rVert ∥ λ v ∥ = ∣ λ ∣ ∥ v ∥ and the triangle inequality are claims 5 and 6 of Elementary Properties of the Euclidean Norm on R n \mathbb{R}^n R n . Write ∂ f = ∂ R n f \partial f=\partial_{\mathbb{R}^{n}}f ∂ f = ∂ R n f for the subdifferential and J = J f J=J_{f} J = J f for the proximal map of f f f .
Step 1 (The exceptional set). Every point of R n \mathbb{R}^{n} R n is an interior point of it, so A Convex Function is Lipschitz on a Ball around an Interior Point provides, for each x 0 x_{0} x 0 , numbers ρ , L \rho,L ρ , L with 0 < ρ 0<\rho 0 < ρ , 0 ≤ L 0\le L 0 ≤ L and ∣ f ( z ) − f ( w ) ∣ ≤ L ∥ z − w ∥ |f(z)-f(w)|\le L\lVert z-w\rVert ∣ f ( z ) − f ( w ) ∣ ≤ L ∥ z − w ∥ for z , w ∈ B ˉ ( x 0 , ρ ) z,w\in\bar{B}(x_{0},\rho) z , w ∈ B ˉ ( x 0 , ρ ) ; that is, f f f is locally Lipschitz on R n \mathbb{R}^{n} R n . By Rademacher's Theorem in R n \mathbb{R}^n R n §locally-lipschitz , applied with m = 1 m=1 m = 1 , the set D D D of those x ∈ R n x\in\mathbb{R}^{n} x ∈ R n at which f f f is not differentiable is null.
By Properties of the Proximal Map of a Convex Function §nonexpansive the map J : R n → R n J:\mathbb{R}^{n}\to\mathbb{R}^{n} J : R n → R n is Lipschitz with constant 1 1 1 ; in particular, for every x 0 x_{0} x 0 its restriction to B ˉ ( x 0 , 1 ) \bar{B}(x_{0},1) B ˉ ( x 0 , 1 ) is Lipschitz with constant 1 1 1 , so J J J is locally Lipschitz on R n \mathbb{R}^{n} R n . By Rademacher's Theorem in R n \mathbb{R}^n R n §locally-lipschitz , applied with m = n m=n m = n , the set
N J = { x ∈ R n : J is not differentiable at x } N_{J}=\{\,x\in\mathbb{R}^{n}:J\text{ is not differentiable at }x\,\} N J = { x ∈ R n : J is not differentiable at x }
is null, and by Lipschitz Images and Lebesgue Outer Measure in R n \mathbb{R}^n R n §locally-lipschitz the image J ( N J ) J(N_{J}) J ( N J ) is null. Let S S S be the set attached to J J J by The Degenerate-Derivative Values of a Locally Lipschitz Map of R n \mathbb{R}^n R n Form a Null Set §degenerate-set , taken with U = R n U=\mathbb{R}^{n} U = R n and T = J T=J T = J ; by The Degenerate-Derivative Values of a Locally Lipschitz Map of R n \mathbb{R}^n R n Form a Null Set §null-image the image J ( S ) J(S) J ( S ) is null.
The union D ∪ J ( N J ) ∪ J ( S ) D\cup J(N_{J})\cup J(S) D ∪ J ( N J ) ∪ J ( S ) is null by claim 5 of Elementary Properties of Lebesgue Outer Measure on R n \mathbb{R}^n R n , so by Null Set of a Measure there is N ∈ B ( R n ) N\in\mathcal{B}(\mathbb{R}^{n}) N ∈ B ( R n ) with D ∪ J ( N J ) ∪ J ( S ) ⊆ N D\cup J(N_{J})\cup J(S)\subseteq N D ∪ J ( N J ) ∪ J ( S ) ⊆ N and λ n ( N ) = 0 \lambda_{n}(N)=0 λ n ( N ) = 0 . We show that f f f is twice differentiable at every y ∈ R n ∖ N y\in\mathbb{R}^{n}\setminus N y ∈ R n ∖ N , which proves claim 1.
Step 2 (The situation at a point off N N N ). Fix y ∈ R n ∖ N y\in\mathbb{R}^{n}\setminus N y ∈ R n ∖ N . Since y ∉ D y\notin D y ∈ / D , the function f f f is differentiable at y y y ; let p ∈ R n p\in\mathbb{R}^{n} p ∈ R n be the point whose i i i th coordinate is the entry in row 1 1 1 and column i i i of the derivative matrix of f f f at y y y . By claim 4 of Elementary Calculus of the Subdifferential of a Convex Function , applied with U = R n U=\mathbb{R}^{n} U = R n ,
∂ f ( y ) = { p } . \partial f(y)=\{p\}. ∂ f ( y ) = { p } .
Put x = y + p x=y+p x = y + p . Then x − y = p ∈ ∂ f ( y ) x-y=p\in\partial f(y) x − y = p ∈ ∂ f ( y ) , so Properties of the Proximal Map of a Convex Function §fiber gives J ( x ) = y J(x)=y J ( x ) = y .
If x x x belonged to N J N_{J} N J then y = J ( x ) y=J(x) y = J ( x ) would lie in J ( N J ) ⊆ N J(N_{J})\subseteq N J ( N J ) ⊆ N ; hence x ∉ N J x\notin N_{J} x ∈ / N J and J J J is differentiable at x x x . Let A A A be its derivative matrix there, a real matrix with n n n rows and n n n columns. Likewise, if x x x belonged to S S S then y = J ( x ) y=J(x) y = J ( x ) would lie in J ( S ) ⊆ N J(S)\subseteq N J ( S ) ⊆ N ; hence x ∉ S x\notin S x ∈ / S . Since J J J is differentiable at x x x , the description of S S S in The Degenerate-Derivative Values of a Locally Lipschitz Map of R n \mathbb{R}^n R n Form a Null Set §degenerate-set shows that there is no ν ∈ R n \nu\in\mathbb{R}^{n} ν ∈ R n with ∥ ν ∥ = 1 \lVert\nu\rVert=1 ∥ ν ∥ = 1 and ν ⋅ ( A h ) = 0 \nu\cdot(Ah)=0 ν ⋅ ( A h ) = 0 for every h ∈ R n h\in\mathbb{R}^{n} h ∈ R n .
By Properties of the Proximal Map of a Convex Function §derivative the map h ↦ A h h\mapsto Ah h ↦ A h is therefore injective. By An Injective Nondegenerate Square Matrix is Invertible §lower-bound there is c ∈ R c\in\mathbb{R} c ∈ R with 0 < c 0<c 0 < c and ∥ A h ∥ ≥ c ∥ h ∥ \lVert Ah\rVert\ge c\lVert h\rVert ∥ A h ∥ ≥ c ∥ h ∥ for every h h h , and by An Injective Nondegenerate Square Matrix is Invertible §invertible the matrix A A A is invertible with
∥ A − 1 k ∥ ≤ c − 1 ∥ k ∥ for every k ∈ R n . \lVert A^{-1}k\rVert\le c^{-1}\lVert k\rVert\qquad\text{for every }k\in\mathbb{R}^{n}. ∥ A − 1 k ∥ ≤ c − 1 ∥ k ∥ for every k ∈ R n .
Put M = A − 1 − I n M=A^{-1}-I_{n} M = A − 1 − I n , the difference of A − 1 A^{-1} A − 1 and the identity matrix .
Step 3 (A first-order expansion of the subdifferential). Let ε ∈ R \varepsilon\in\mathbb{R} ε ∈ R with 0 < ε 0<\varepsilon 0 < ε , and let η \eta η be the smaller of c / 2 c/2 c /2 and ε c 2 / 2 \varepsilon c^{2}/2 ε c 2 /2 , a positive real number. By Differentiability at a Point for Maps Between Euclidean Spaces , applied to J J J at x x x with η \eta η in place of ε \varepsilon ε , there is δ 2 > 0 \delta_{2}>0 δ 2 > 0 such that
∥ J ( x ′ ) − J ( x ) − A ( x ′ − x ) ∥ ≤ η ∥ x ′ − x ∥ whenever ∥ x ′ − x ∥ < δ 2 , (J) \lVert J(x')-J(x)-A(x'-x)\rVert\le\eta\,\lVert x'-x\rVert\qquad\text{whenever }\lVert x'-x\rVert<\delta_{2}, \tag{J} ∥ J ( x ′ ) − J ( x ) − A ( x ′ − x )∥ ≤ η ∥ x ′ − x ∥ whenever ∥ x ′ − x ∥ < δ 2 , ( J )
the case x ′ = x x'=x x ′ = x holding trivially because both sides are then 0 0 0 . Since ∂ f ( y ) = { p } \partial f(y)=\{p\} ∂ f ( y ) = { p } , claim 5 of Elementary Calculus of the Subdifferential of a Convex Function , applied with the positive number δ 2 / 2 \delta_{2}/2 δ 2 /2 , provides δ 1 > 0 \delta_{1}>0 δ 1 > 0 such that every y ′ ∈ R n y'\in\mathbb{R}^{n} y ′ ∈ R n with ∥ y ′ − y ∥ < δ 1 \lVert y'-y\rVert<\delta_{1} ∥ y ′ − y ∥ < δ 1 and every q ′ ∈ ∂ f ( y ′ ) q'\in\partial f(y') q ′ ∈ ∂ f ( y ′ ) satisfy ∥ q ′ − p ∥ < δ 2 / 2 \lVert q'-p\rVert<\delta_{2}/2 ∥ q ′ − p ∥ < δ 2 /2 . Let δ \delta δ be the smaller of δ 1 \delta_{1} δ 1 and δ 2 / 2 \delta_{2}/2 δ 2 /2 .
Let y ′ ∈ R n y'\in\mathbb{R}^{n} y ′ ∈ R n with ∥ y ′ − y ∥ < δ \lVert y'-y\rVert<\delta ∥ y ′ − y ∥ < δ and let q ′ ∈ ∂ f ( y ′ ) q'\in\partial f(y') q ′ ∈ ∂ f ( y ′ ) ; put x ′ = y ′ + q ′ x'=y'+q' x ′ = y ′ + q ′ . Then x ′ − y ′ = q ′ ∈ ∂ f ( y ′ ) x'-y'=q'\in\partial f(y') x ′ − y ′ = q ′ ∈ ∂ f ( y ′ ) , so J ( x ′ ) = y ′ J(x')=y' J ( x ′ ) = y ′ by Properties of the Proximal Map of a Convex Function §fiber . Moreover x ′ − x = ( y ′ − y ) + ( q ′ − p ) x'-x=(y'-y)+(q'-p) x ′ − x = ( y ′ − y ) + ( q ′ − p ) , so
∥ x ′ − x ∥ ≤ ∥ y ′ − y ∥ + ∥ q ′ − p ∥ < 1 2 δ 2 + 1 2 δ 2 = δ 2 , \lVert x'-x\rVert\le\lVert y'-y\rVert+\lVert q'-p\rVert<\tfrac{1}{2}\delta_{2}+\tfrac{1}{2}\delta_{2}=\delta_{2}, ∥ x ′ − x ∥ ≤ ∥ y ′ − y ∥ + ∥ q ′ − p ∥ < 2 1 δ 2 + 2 1 δ 2 = δ 2 ,
and (J) applies. Put R = ( y ′ − y ) − A ( x ′ − x ) R=(y'-y)-A(x'-x) R = ( y ′ − y ) − A ( x ′ − x ) , so that ∥ R ∥ ≤ η ∥ x ′ − x ∥ \lVert R\rVert\le\eta\lVert x'-x\rVert ∥ R ∥ ≤ η ∥ x ′ − x ∥ because J ( x ′ ) − J ( x ) = y ′ − y J(x')-J(x)=y'-y J ( x ′ ) − J ( x ) = y ′ − y .
We first bound ∥ x ′ − x ∥ \lVert x'-x\rVert ∥ x ′ − x ∥ . Since A ( x ′ − x ) = ( y ′ − y ) − R A(x'-x)=(y'-y)-R A ( x ′ − x ) = ( y ′ − y ) − R ,
c ∥ x ′ − x ∥ ≤ ∥ A ( x ′ − x ) ∥ ≤ ∥ y ′ − y ∥ + ∥ R ∥ ≤ ∥ y ′ − y ∥ + c 2 ∥ x ′ − x ∥ , c\,\lVert x'-x\rVert\le\lVert A(x'-x)\rVert\le\lVert y'-y\rVert+\lVert R\rVert\le\lVert y'-y\rVert+\tfrac{c}{2}\lVert x'-x\rVert, c ∥ x ′ − x ∥ ≤ ∥ A ( x ′ − x )∥ ≤ ∥ y ′ − y ∥ + ∥ R ∥ ≤ ∥ y ′ − y ∥ + 2 c ∥ x ′ − x ∥ ,
using η ≤ c / 2 \eta\le c/2 η ≤ c /2 ; hence c 2 ∥ x ′ − x ∥ ≤ ∥ y ′ − y ∥ \tfrac{c}{2}\lVert x'-x\rVert\le\lVert y'-y\rVert 2 c ∥ x ′ − x ∥ ≤ ∥ y ′ − y ∥ and ∥ x ′ − x ∥ ≤ 2 c ∥ y ′ − y ∥ \lVert x'-x\rVert\le\tfrac{2}{c}\lVert y'-y\rVert ∥ x ′ − x ∥ ≤ c 2 ∥ y ′ − y ∥ .
Next we identify q ′ − p − M ( y ′ − y ) q'-p-M(y'-y) q ′ − p − M ( y ′ − y ) . From q ′ = x ′ − y ′ q'=x'-y' q ′ = x ′ − y ′ and p = x − y p=x-y p = x − y we get q ′ − p = ( x ′ − x ) − ( y ′ − y ) q'-p=(x'-x)-(y'-y) q ′ − p = ( x ′ − x ) − ( y ′ − y ) , and by claims 1 and 2 of Linearity of the Matrix-Vector Product and the Quadratic Form as a Double Sum , M ( y ′ − y ) = A − 1 ( y ′ − y ) − ( y ′ − y ) M(y'-y)=A^{-1}(y'-y)-(y'-y) M ( y ′ − y ) = A − 1 ( y ′ − y ) − ( y ′ − y ) . Hence
q ′ − p − M ( y ′ − y ) = ( x ′ − x ) − A − 1 ( y ′ − y ) . q'-p-M(y'-y)=(x'-x)-A^{-1}(y'-y). q ′ − p − M ( y ′ − y ) = ( x ′ − x ) − A − 1 ( y ′ − y ) .
Applying A − 1 A^{-1} A − 1 to y ′ − y = A ( x ′ − x ) + R y'-y=A(x'-x)+R y ′ − y = A ( x ′ − x ) + R and using claim 1 of Linearity, Compatibility with the Matrix Product, and a Norm Bound for the Matrix-Vector Product , claim 2 of that lemma, the identity A − 1 A = I n A^{-1}A=I_{n} A − 1 A = I n furnished by Inverse Matrix and Invertible Real Square Matrix , and claim 2 of Linearity of the Matrix-Vector Product and the Quadratic Form as a Double Sum , we get A − 1 ( y ′ − y ) = ( x ′ − x ) + A − 1 R A^{-1}(y'-y)=(x'-x)+A^{-1}R A − 1 ( y ′ − y ) = ( x ′ − x ) + A − 1 R . Therefore
q ′ − p − M ( y ′ − y ) = − A − 1 R , q'-p-M(y'-y)=-A^{-1}R, q ′ − p − M ( y ′ − y ) = − A − 1 R ,
and consequently
∥ q ′ − p − M ( y ′ − y ) ∥ = ∥ A − 1 R ∥ ≤ c − 1 ∥ R ∥ ≤ c − 1 η ∥ x ′ − x ∥ ≤ 2 η c 2 ∥ y ′ − y ∥ ≤ ε ∥ y ′ − y ∥ , \bigl\lVert q'-p-M(y'-y)\bigr\rVert=\lVert A^{-1}R\rVert\le c^{-1}\lVert R\rVert\le c^{-1}\eta\,\lVert x'-x\rVert\le\frac{2\eta}{c^{2}}\,\lVert y'-y\rVert\le\varepsilon\,\lVert y'-y\rVert, q ′ − p − M ( y ′ − y ) = ∥ A − 1 R ∥ ≤ c − 1 ∥ R ∥ ≤ c − 1 η ∥ x ′ − x ∥ ≤ c 2 2 η ∥ y ′ − y ∥ ≤ ε ∥ y ′ − y ∥ ,
the last step because η ≤ ε c 2 / 2 \eta\le\varepsilon c^{2}/2 η ≤ ε c 2 /2 .
Step 4 (Conclusion of claim 1). Step 3 shows that for every ε > 0 \varepsilon>0 ε > 0 there is δ > 0 \delta>0 δ > 0 such that ∥ q ′ − p − M ( y ′ − y ) ∥ ≤ ε ∥ y ′ − y ∥ \lVert q'-p-M(y'-y)\rVert\le\varepsilon\lVert y'-y\rVert ∥ q ′ − p − M ( y ′ − y )∥ ≤ ε ∥ y ′ − y ∥ for every y ′ y' y ′ with ∥ y ′ − y ∥ < δ \lVert y'-y\rVert<\delta ∥ y ′ − y ∥ < δ and every q ′ ∈ ∂ f ( y ′ ) q'\in\partial f(y') q ′ ∈ ∂ f ( y ′ ) . Since p ∈ ∂ f ( y ) p\in\partial f(y) p ∈ ∂ f ( y ) , A First-Order Expansion of the Subdifferential Gives a Second-Order Expansion of the Function §twice-differentiable applies with this M M M and shows that f f f is twice differentiable at y y y , with first-order coefficient p p p and Hessian 1 2 ( M + M ⊤ ) \tfrac{1}{2}(M+M^{\top}) 2 1 ( M + M ⊤ ) . As y ∈ R n ∖ N y\in\mathbb{R}^{n}\setminus N y ∈ R n ∖ N was arbitrary, claim 1 is proved.
Step 5 (Claim 2). Let y ∈ R n y\in\mathbb{R}^{n} y ∈ R n be a point at which f f f is twice differentiable, with first-order coefficient p p p and Hessian B = D 2 f ( y ) B=D^{2}f(y) B = D 2 f ( y ) , and let h ∈ R n h\in\mathbb{R}^{n} h ∈ R n . If h = 0 h=0 h = 0 then h ⋅ ( B h ) = 0 h\cdot(Bh)=0 h ⋅ ( B h ) = 0 , so assume h ≠ 0 h\neq0 h = 0 .
Let ε > 0 \varepsilon>0 ε > 0 and let δ > 0 \delta>0 δ > 0 be as in Twice Differentiability at a Point §twice-differentiable for this ε \varepsilon ε . Put t = δ / ( 2 ∥ h ∥ ) t=\delta/(2\lVert h\rVert) t = δ / ( 2 ∥ h ∥) , a positive real number, so that ∥ t h ∥ = ∥ − t h ∥ = t ∥ h ∥ < δ \lVert th\rVert=\lVert -th\rVert=t\lVert h\rVert<\delta ∥ t h ∥ = ∥ − t h ∥ = t ∥ h ∥ < δ . Applying the defining estimate to t h th t h and to − t h -th − t h , and using p ⋅ ( − t h ) = − t p ⋅ h p\cdot(-th)=-t\,p\cdot h p ⋅ ( − t h ) = − t p ⋅ h and ( − t h ) ⋅ ( B ( − t h ) ) = t 2 h ⋅ ( B h ) = ( t h ) ⋅ ( B ( t h ) ) (-th)\cdot(B(-th))=t^{2}\,h\cdot(Bh)=(th)\cdot(B(th)) ( − t h ) ⋅ ( B ( − t h )) = t 2 h ⋅ ( B h ) = ( t h ) ⋅ ( B ( t h )) ,
∣ f ( y + t h ) − f ( y ) − t p ⋅ h − 1 2 t 2 h ⋅ ( B h ) ∣ ≤ ε t 2 ∥ h ∥ 2 \bigl|f(y+th)-f(y)-t\,p\cdot h-\tfrac{1}{2}t^{2}h\cdot(Bh)\bigr|\le\varepsilon t^{2}\lVert h\rVert^{2} f ( y + t h ) − f ( y ) − t p ⋅ h − 2 1 t 2 h ⋅ ( B h ) ≤ ε t 2 ∥ h ∥ 2
and the same with − t -t − t in place of t t t . Adding the two, and using claim 5 of Properties of the Absolute Value in an Ordered Field ,
∣ f ( y + t h ) + f ( y − t h ) − 2 f ( y ) − t 2 h ⋅ ( B h ) ∣ ≤ 2 ε t 2 ∥ h ∥ 2 . \bigl|f(y+th)+f(y-th)-2f(y)-t^{2}h\cdot(Bh)\bigr|\le2\varepsilon t^{2}\lVert h\rVert^{2}. f ( y + t h ) + f ( y − t h ) − 2 f ( y ) − t 2 h ⋅ ( B h ) ≤ 2 ε t 2 ∥ h ∥ 2 .
On the other hand y = 1 2 ( y + t h ) + 1 2 ( y − t h ) y=\tfrac{1}{2}(y+th)+\tfrac{1}{2}(y-th) y = 2 1 ( y + t h ) + 2 1 ( y − t h ) , so Convex Real-Valued Function on a Convex Subset of R n \mathbb{R}^n R n , applied with the parameter 1 2 \tfrac{1}{2} 2 1 and the points y + t h y+th y + t h and y − t h y-th y − t h , gives f ( y ) ≤ 1 2 f ( y + t h ) + 1 2 f ( y − t h ) f(y)\le\tfrac{1}{2}f(y+th)+\tfrac{1}{2}f(y-th) f ( y ) ≤ 2 1 f ( y + t h ) + 2 1 f ( y − t h ) , that is 0 ≤ f ( y + t h ) + f ( y − t h ) − 2 f ( y ) 0\le f(y+th)+f(y-th)-2f(y) 0 ≤ f ( y + t h ) + f ( y − t h ) − 2 f ( y ) . Combining with the previous display and claim 6 of Properties of the Absolute Value in an Ordered Field ,
0 ≤ t 2 h ⋅ ( B h ) + 2 ε t 2 ∥ h ∥ 2 , 0\le t^{2}h\cdot(Bh)+2\varepsilon t^{2}\lVert h\rVert^{2}, 0 ≤ t 2 h ⋅ ( B h ) + 2 ε t 2 ∥ h ∥ 2 ,
and dividing by the positive number t 2 t^{2} t 2 gives h ⋅ ( B h ) ≥ − 2 ε ∥ h ∥ 2 h\cdot(Bh)\ge-2\varepsilon\lVert h\rVert^{2} h ⋅ ( B h ) ≥ − 2 ε ∥ h ∥ 2 . As ε > 0 \varepsilon>0 ε > 0 was arbitrary, h ⋅ ( B h ) ≥ 0 h\cdot(Bh)\ge0 h ⋅ ( B h ) ≥ 0 .
Since every entry of 0 n 0_{n} 0 n is 0 0 0 , Matrix-Vector Product gives 0 n h = 0 0_{n}h=0 0 n h = 0 and hence h ⋅ ( 0 n h ) = 0 h\cdot(0_{n}h)=0 h ⋅ ( 0 n h ) = 0 . Thus h ⋅ ( 0 n h ) ≤ h ⋅ ( B h ) h\cdot(0_{n}h)\le h\cdot(Bh) h ⋅ ( 0 n h ) ≤ h ⋅ ( B h ) for every h ∈ R n h\in\mathbb{R}^{n} h ∈ R n , which is 0 n ⪯ B 0_{n}\preceq B 0 n ⪯ B by The Positive Semidefinite Ordering on Symmetric Matrices .