I need to calculate the gradient and hessian of a function $\frac{\langle Ax, x \rangle}{\langle x, x \rangle}$ where $A$ is a symmetric real matrix. I am a bit familiar with matrix derivatives, so I hopefully calculated the differential correctly $$ dR = \left \langle \frac{2Ax}{\langle x, x \rangle} - \frac{2x\langle Ax, x \rangle}{\langle x, x \rangle^2}, dx \right \rangle = \langle \nabla R(x), dx \rangle $$ But I am completely lost with hessian. I don't understand how I can derive it and move $d_2$ and $d_1$ on correct places and preserve the correct sizes of factors. How can I do that?
2026-04-01 16:47:40.1775062060
How to calculate hessian of <Ax, x> / <x, x>
171 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in DERIVATIVES
- Derivative of $ \sqrt x + sinx $
- Second directional derivative of a scaler in polar coordinate
- A problem on mathematical analysis.
- Why the derivative of $T(\gamma(s))$ is $T$ if this composition is not a linear transformation?
- Does there exist any relationship between non-constant $N$-Exhaustible function and differentiability?
- Holding intermediate variables constant in partial derivative chain rule
- How would I simplify this fraction easily?
- Why is the derivative of a vector in polar form the cross product?
- Proving smoothness for a sequence of functions.
- Gradient and Hessian of quadratic form
Related Questions in MATRIX-CALCULUS
- How to compute derivative with respect to a matrix?
- Definition of matrix valued smooth function
- Is it possible in this case to calculate the derivative with matrix notation?
- Monoid but not a group
- Can it be proved that non-symmetric matrix $A$ will always have real eigen values?.
- Gradient of transpose of a vector.
- Gradient of integral of vector norm
- Real eigenvalues of a non-symmetric matrix $A$ ?.
- How to differentiate sum of matrix multiplication?
- Derivative of $\log(\det(X+X^T)/2 )$ with respect to $X$
Related Questions in HESSIAN-MATRIX
- Check if $\phi$ is convex
- Gradient and Hessian of quadratic form
- Let $f(x) = x^\top Q \, x$, where $Q \in \mathbb R^{n×n}$ is NOT symmetric. Show that the Hessian is $H_f (x) = Q + Q^\top$
- An example for a stable harmonic map which is not a local minimizer
- Find global minima for multivariable function
- The 2-norm of inverse of a Hessian matrix
- Alternative to finite differences for numerical computation of the Hessian of noisy function
- Interpretation of a Global Minima in $\mathbb{R}^2$
- How to prove that a level set is not a submanifold of dimension 1
- Hessian and metric tensors on riemannian manifolds
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
$ \def\c#1{\color{red}{#1}} \def\a{\alpha}\def\b{\beta}\def\l{\lambda} \def\o{{\tt1}}\def\p{\partial} \def\L{\left}\def\R{\right} \def\LR#1{\L(#1\R)} \def\RR#1{\c{\LR{#1}}} \def\BR#1{\Big(#1\Big)} \def\trace#1{\operatorname{Tr}\LR{#1}} \def\qiq{\quad\implies\quad} \def\grad#1#2{\frac{\p #1}{\p #2}} \def\hess#1#2#3{\frac{\p^2 #1}{\p #2\,\p #3}} $Let's use a colon to denote the trace/Frobenius product, i.e. $$\eqalign{ A:B &= \sum_{i=1}^m\sum_{j=1}^n A_{ij}B_{ij} \;=\; \trace{AB^T} \\ A:A &= \big\|A\big\|^2_F \\ }$$ When applied to vectors $(n=\o)$ it reduces to the standard dot product.
Then consider the following scalar functions and their differentials. $$\eqalign{ \a &= A:xx^T &\qiq &d\a=2Ax:dx,\quad&A^T=A \\ \b &= B:xx^T &\qiq &d\b=2Bx:dx,\quad&B^T=B \\ }$$ Use these to rewrite your objective function, then calculate its differential and gradient. $$\eqalign{ \l &= \b^{-1}\a \\ d\l &= \b^{-2}\LR{\b\,d\a-\a\,d\b} \\ &= \b^{-1}\LR{2Ax-2\l Bx}:dx \\ \grad{\l}{x} &= 2\b^{-1}\LR{A-\l B}x \;\;\doteq\;\; g \\ }$$ Now calculate the differential and gradient of the gradient. $$\eqalign{ dg &= 2\b^{-1}\LR{A-\l B}\RR{dx} - 2\b^{-1}Bx\RR{d\l} + 2\LR{A-\l B}x\RR{d\b^{-1}} \\ &= 2\b^{-1}\LR{A-\l B}dx -2\b^{-1}\LR{Bx}g^Tdx - \LR{\b g}\,\b^{-2}\LR{2Bx}^Tdx \\ &= 2\b^{-1}\BR{A-\l B -{Bx}g^T -gx^TB}\,dx \\ \grad{g}{x} &= 2\b^{-1}\BR{A-\l B -{Bx}g^T -gx^TB} \;\;\doteq\;\; H \\ }$$ So that's the Hessian. Obviously you are interested in the case where $B=I$.
To reduce some of the expressions above, the following relationships were utilized $$\eqalign{ &d\l = g:dx \;=\; g^Tdx \\ &d\b^{-1} = -\b^{-2}d\b \;\;=\ -\b^{-2}\LR{2Bx}^Tdx \\ }$$