Given $a^T X^{-1} b$, where $a,b$ are $n\times 1$ vector, $X$ is $n \times n$ matrix. It is easy to see that $\frac{\partial a^{T} X b}{\partial X}=ab^{T}$, but what is $\frac{\partial a^{T} X^{-1} b}{\partial X}$? If I do this $\frac{\partial a^{T} {X^{-1}} b}{\partial X}= \frac{\partial a^T X^{-1} b }{\partial X^{-1}} * \frac{\partial X^{-1} }{\partial X}$, what is $\frac{\partial X^{-1} }{\partial X}$? Any hint?
Prove that $$\nabla_{\mathrm X} \mbox{tr} (\mathrm A \mathrm X^{-1} \mathrm B) = - \mathrm X^{-\top} \mathrm A^\top \mathrm B^\top \mathrm X^{-\top}$$   My proof is below. I am interested in other proofs.    My proof  Let   $$f (\mathrm X) := \mbox{tr} (\mathrm A \mathrm X^{-1} \mathrm B)$$  Hence,  $$\begin{array}{rl} f (\mathrm X + h \mathrm V) &amp;= \mbox{tr} (\mathrm A (\mathrm X + h \mathrm V)^{-1} \mathrm B)\\ &amp;= \mbox{tr} (\mathrm A (\mathrm X ( \mathrm I + h \mathrm X^{-1} \mathrm V))^{-1} \mathrm B)\\ &amp;= \mbox{tr} (\mathrm A ( \mathrm I + h \mathrm X^{-1} \mathrm V)^{-1} \mathrm X^{-1} \mathrm B)\\ &amp;= \mbox{tr} (\mathrm A ( \mathrm I - h \mathrm X^{-1} \mathrm V + O (h^2)) \mathrm X^{-1} \mathrm B)\\ &amp;= \mbox{tr} (\mathrm A \mathrm X^{-1} \mathrm B) - h \, \mbox{tr} ( \mathrm A \mathrm X^{-1} \mathrm V \mathrm X^{-1} \mathrm B) + O (h^2)\\ &amp;= f (\mathrm X) - h \, \mbox{tr} ( \mathrm X^{-1} \mathrm B \mathrm A \mathrm X^{-1} \mathrm V ) + O (h^2)\end{array}$$  Thus, the directional derivative of $f$ in the direction of $\mathrm V$ at $\mathrm X$ is  $$D_{\mathrm V} f (\mathrm X) = - \mbox{tr} ( \mathrm X^{-1} \mathrm B \mathrm A \mathrm X^{-1} \mathrm V ) = - \mbox{tr} ( (\mathrm X^{-\top} \mathrm A^\top \mathrm B^\top \mathrm X^{-\top})^\top \mathrm V ) = - \langle \mathrm X^{-\top} \mathrm A^\top \mathrm B^\top \mathrm X^{-\top}, \mathrm V \rangle$$  and, lastly,  $$\nabla_{\mathrm X} \mbox{tr} (\mathrm A \mathrm X^{-1} \mathrm B) = - \mathrm X^{-\top} \mathrm A^\top \mathrm B^\top \mathrm X^{-\top}$$
How to initialize a struct in accordance with C programming language standards I want to initialize a struct element, split in declaration and initialization. This is what I have:  typedef struct MY_TYPE {   bool flag;   short int value;   double stuff; } MY_TYPE;  void function(void) {   MY_TYPE a;   ...   a = { true, 15, 0.123 } }   Is this the way to declare and initialize a local variable of MY_TYPE in accordance with C programming language standards (C89, C90, C99, C11, etc.)? Or is there anything better or at least working?  Update I ended up having a static initialization element where I set every subelement according to my needs. Scattering, Perturbation and asymptotic states in LSZ reduction formula I was following Schwarz's book on quantum field theory. There he defines the asymptotic momentum eigenstates $|i\rangle\equiv |k_1 k_2\rangle$ and $|f\rangle\equiv |k_3 k_4\rangle$ in the S-matrix element $\langle f|S|i\rangle$ as the eigenstates of the full Hamiltonian i.e., $H=H_0+H_{int}$. Therefore, the states $|i\rangle=|k_1 k_2\rangle$ is defined as $$|k_1 k_2\rangle=a_{k_1}^{\dagger}(-\infty) a_{k_2}^{\dagger}(-\infty)|\Omega\rangle$$ where $|\Omega\rangle$ is the vacuum of the full interacting theory. Then the LSZ reduction formula connects the S-matrix element $\langle f|S|i\rangle$ to the Green' functions of the interaction theory defined as $$G^{(n)}(x_1,x_2,...x_n)=\langle \Omega|T[\phi(x_1)\phi(x_2)...\phi(x_n)]|\Omega\rangle.$$ Here are a few doubts. Doubt 1 When the particles are far away, the interaction can be considered to be adiabatically switched off. Therefore, at $t=\pm\infty$ the states are really free particle states and should have been written as $$|k_1 k_2\rangle=a_{k_1}^{\dagger}(-\infty) a_{k_2}^{\dagger}(-\infty)|0\rangle$$ and $$|k_3 k_4\rangle=a_{k_3}^{\dagger}(+\infty) a_{k_4}^{\dagger}(+\infty)|0\rangle$$ where $|0\rangle$ is the vacuum of the free theory.  I do not understand why these the states $|i\rangle$ and $|f\rangle$ are derived from $|\Omega\rangle$ instead of $|0\rangle$. Doubt 2 The initial and final states were derived from the vacuum of the interacting theory $|\Omega\rangle$. According to my understanding, this suggests that the states $|i\rangle\equiv |k_1 k_2\rangle$ and $|f\rangle\equiv |k_3 k_4\rangle$  are eigenstates of the full Hamiltonian $H$. Since then there is no perturbation, there should not be any scattering or transition at all.  More references Even Peskin &amp; Schroeder, Bjorken &amp; Drell, Srednicki take the same approach as Schwartz; they too define the external momentum eigenstates to the eigenstate of the full Hamiltonian $H$. However, if the system was initially in a stationary state why should it undergo a transition in absence of any perturbation? Get TEXT value of a CLOB OID in Postgresql Why does the experience-to-next-level not change between some levels? At every level from 1st to 11th, the experience needed to reach the next level (from the current level) increases every level. However, this pattern gets broken for most of the later levels:   Going from 10th to 11th takes 21,000xp (= 85k - 64k), but 11th to 12th takes only 15,000xp! (= 100k - 85k). Both 13th and 14th level only take extra 20k experience each, i.e. the amount needed doesn't increase between those two levels. Levels 16 and 17 similarly only need 30k experience each, and 18 and 19 only need 40k experience each.   Why does the last half of the experience chart have some of these levels maintain the same experience costs, and even briefly decrease the experience cost for 12th level? A set of elements in a reduced unity ring Let $(A,+,\cdot)$ be a unity ring with the property that if $x \in A$ and $x^2=0$ then $x=0$. Consider the set $M=\{a\in A | a^3=a\}$. Prove that:      a) $2a\in Z(A)$, $\forall a\in M$, where $Z(A)$ denotes the centre of the ring $A$;   b) $ab=ba$, $\forall a,b\in M$.   My attempts revolved around the fact that an idempotent element in a reduced ring is central. So, since for $a\in M$ we have that $(a^2)^2=a^2$, it follows that $a^2\in Z(A)$, $\forall a\in M$. The next thing I wanted to use in order to solve a) was that $Z(A)$ is a subring of $A$, so if I had proved that $(a+1)^2 \in Z(A)$, $\forall a\in M$, then we would have reached the desired conclusion. However, I couldn't prove this and I honestly doubt that it is true. Another idea that I had was to prove that $M$ is a subring of $A$. Of course, this didn't work out because I cannot even prove that $M$ is closed under addition. Again, I don't know if this is true and it most likely isn't. As for b), I think that a) should be of use, but I don't know how. It is a well-known problem that a ring with $x^3=x$ for any $x$ in that ring is commutative, but since $(M,+,\cdot)$ is almost definitely not a ring, this doesn't help. EDIT: Is there any chance that this question is simply wrong? I tended to believe this before asking it here too, but since nobody has made any progress on it until now I am even more inclined to think so. The nose of Tom Riddle (as a student) was fine, as I have seen in the movies. But, Voldemort's nose doesn't look like a normal human nose. What really happened? If $A$ is a non-empty set, then $A \notin A$ Exercise 3.2.2 Use the axiom of regularity and the singleton set axiom to show that if $A$ is a set then $A \notin A$.  Axiom of Regularity: If $A$ is a non-empty set, then there is at least one element x of A which is either not a set, or is disjoint from A.  Singleton Set Axiom: If $a$ is an object, then there exists a set $\{a\}$ whose only element is $a$, we refer to $\{a\}$ as the singleton set whose element is $a$ Furthermore, if $a$ and $b$ are objects, then there exists a set $\{a,b\}$ whose only elements are $a$ and $b$    I think I can give the proof when A is the non-empty set which contains finite elements. However, can anyone give any hint for the general case?  Suppose $A \in A$   Then eixsts $x$ such that either $x$ is not a set or $x \cap A$=$\emptyset$  Then it is clear thar $x \ne A$ (if $x = A$, then $x \cap A \ne \emptyset$)  We observe that as an element, $A$ $\ne$ $x$, $A$ $\in$ $A$  Then $A$ $\in$ $A-x$   Define the new set $A-x$ as $A_1$  then exists $x_1$ such that $A \in A_1-x_1$  After finite steps  we find that $A \in \emptyset $  which leads to contradiction. How many players can play split-screen, and what game modes are (or aren't) available?   How many players can play local co-op? How many players can play local multiplayer? How many players can play online multiplayer from a single console? How to show textures in the 3D View editor? I have added some textures to objects in blender but the textures don't show up until I render the file. it can be difficult to know what the objects look like without rendering it. is there a way to have textures show in the editor even if they are at a lower res?  In editor:    Rendered: There's an election going on. What's happening and how does it work? An insurance company supposes that the number of accidents that each of its policyholders will have this year is Poisson distributed, with a mean depending on the policyholder: the Poisson mean Λ of a randomly chosen person has a Gamma distribution with the Γ(2, 1)-density function fΛ(λ) = λe−λ (λ > 0). Find the expected value of Λ for a policyholder having x accidents this year (x = 0, 1, 2, . . .).  I am not sure how to incorporate the gamma parameters. So far I have found P(X = n|Λ = λ) = Poisson(λ) and fΛ(λ)= Exp(λ) so by integrating P(X = n|Λ = λ)fΛ(λ) then letting the integral of Gamma (n + 2, 2) equate to 1, I have worked out P(X = n) = (n + 1)/2^(n+2). How do you find the expected value of Λ from that? I have seen that a Gamma-Poison mix has E(X) = αβ which would give 2 but I have tried integrating fΛ(λ) and can't seem to get 2. Do I need a UK visa? How and where to apply? Identifier for win64 configuration in Qmake Is there a "win64" identifier in Qmake project files?  documentation does not mention other than unix / macx / win32.  So far I've tried using:  win32:message("using win32") win64:message("using win64") amd64:message("using amd64")   The result is always "using win32".  Must I use a separate project-file for x32 and x64 projects, so they would compile against correct libraries? Is there any other way to identify between 32-bit and 64-bit environments? What does the factorial of a negative number signify? I understand that the factorial gives the number of arrangements. For example: the factorial of zero i.e. an empty set ( doesn't occur) is 1.   As the empty set can be arranged only in 1 way - i.e. by filling nothing. Now, let's take an example: 5 distinct seats. How many ways 5 distinct seats can be arranged? - 5! ways i.e. 120.  So, basically, factorial gives us the arrangements. Now, the question is why do we need to know the factorial of a negative number?, let's say -5. How can we imagine that there are -5 seats, and we need to arrange it? Something, which doesn't exist shouldn't have an arrangement right? Can someone please throw some light on it?. I saw some research done on the formula - How do I use formatting in comments? I see some people write comments that are for example - in italics.  I do not see any way of doing that while writing my comments. Why is it so? A certain physics problem I have been working on has turned into a math problem. Particularly, I want to find the solutions of some equation of the form   $$f(x)=ae^{bx}+cx+d = 0$$  where $a, b, c,$ and $d$ are constant, real numbers that come from the physics problem and $x$ will be a real number. I do not know how to find the solutions of an equation of this form. In the special case where $c=0$, the solution is simply  $$x = \frac{\ln(\frac{-d}{a})}{b}$$  but for other values of $c$, I am stumped. If there is no exact form for the roots, is there a relatively simple way to estimate the roots? How would I import/export Blender's preferences? Since upgrading to 13.10, I can't log in to unity desktop. Light dm works correctly, but attempting to log in tries to start the session then drops back to light. I've already dropped to terminal (ctrl+alt+f2) and done this:  sudo apt-get update  sudo apt-get install --reinstall ubuntu-desktop  sudo apt-get install unity   Logging in as a guest session also fails. Logging in to other window managers works with varying degrees of success.  Note: I have Cinnamon 2.0 installed from PPA.  I'm using a 2 monitor setup.  Also of note is that the session prior to my upgrade to 13.10 the background of unity failed to display at all, instead showing what was there in the screen buffer from the previous frame. The entire OS worked correctly otherwise though, so I just ignored it for the session. No other upgrades or even updates were done prior to this occurring.  My upgrade path to 13.10 was basically this: Install 13.04 alongside Windows 7, use ubuntu as a glorified web browser for a while, get updates (in preparation for 13.10), install 13.10.  I also used Unity Tweak Tool to change some aspects of unity, particularly auto-hide.  Any help or ideas would be appreciated, as I'm typing this on my phone :( Harry was never a Horcrux of Voldemort     I have heard this line on SE a lot &amp; also vaguely read about that discussion.     My question is if Harry was not Voldemort's Horcrux &amp; if all the other 6 (5 inanimate objects &amp; Nagini) were destroyed beyond repair &amp; Harry tries to Avada Kedavra Voldemort, would he die? What would happen to Voldemort's soul inside Harry.  I've asked this question keeping in mind Harry isn't a technical Horcrux but only a part of Voldemort's soul is in him. So can Voldemort resurrect from this soul?    If its a duplicate, please mention the relevant discussion link in the comments Why do people have darker skin in sunnier climates? I don't understand why darker skin is advantageous in hotter climates. Wouldn't it absorb more of the heat? I have heard that it reduces the incidence of cancer, but I would think absorbing more radiation would increase the risk?