Quantcast
Channel: Confusion about matrix differentiation in a nonlinear matrix equation - Computational Science Stack Exchange
Viewing all articles
Browse latest Browse all 3

Answer by greg for Confusion about matrix differentiation in a nonlinear matrix equation

$
0
0

$\def\R#1{{\mathbb R}^{#1}}\def\o{{\large\tt1}}\def\D{{\cal D}}\def\k{\otimes} \def\h{\odot}\def\bR#1{\big(#1\big)}\def\BR#1{\Big(#1\Big)}\def\LR#1{\left(#1\right)}\def\op#1{\operatorname{#1}}\def\vc#1{\op{vec}\LR{#1}}\def\Diag#1{\op{Diag}\LR{#1}}\def\qiq{\quad\implies\quad} \def\mt{\mapsto}\def\p{\partial} \def\grad#1#2{\frac{\p #1}{\p #2}}\def\c#1{\color{red}{#1}}\def\CLR#1{\c{\LR{#1}}}$First let's clean up some variable names by stripping off unnecessary decorations$$\eqalign{\LR{\Delta t,V^T,K^{n+1},K^n} \;\mt\; \LR{h,A,X,Y} \\}$$Let's also use standard notation for elementwise products and powers$$\eqalign{X^{\h 3} = X\h X\h X \\}$$And introduce the all-ones matrix $\o\in\R{m\times n}$and identity matrix $I_m\in\R{m\times m}$

Rewrite the function and calculate its differential$$\eqalign{F &= X - Y - hI_m\BR{\LR{XA}^{\h 3} - XA}A^T \\dF &= dX - hI_m\BR{\LR{3\LR{XA}^{\h 2} - \o}\odot\bR{dX\,A}}A^T \\}$$To avoid introducing tensors, vectorize the equationand calculate the Jacobian$$\eqalign{df &= \vc{dF} \\&= dx-h\LR{A\k I_m}\,\vc{\LR{3\LR{XA}^{\h 2}-\o}\odot\bR{dX\,A}} \\&= dx-h\LR{A\k I_m}\,\c{\Diag{\vc{3\LR{XA}^{\h 2}-\o}}}\,\vc{dX\,A} \\&= dx - h\LR{A\k I_m}\,\c{\D}\,\LR{A^T\k I_m}dx \\J\doteq\grad fx&= I_{mr} - h\LR{A\k I_m}\,\c{\D}\,\LR{A^T\k I_m} \;\in\; \R{mr\times mr}}$$NB: The Jacobian is a symmetric matrix.

Newton's method requires calculating $J^{-1}\,$ at every step, which is a standard operation for a matrix, but what does that mean for a fourth-order tensor?

IOW, you could calculate an expression for $\large\grad FX,\,$but what would you do with it?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images