# Matrix derivative of $A(x) \left(A(x)^*A(x)\right)^{-1} A(x)^*$ w.r.t. $x$, where $A(x)$ unknown matrix is a function of $x$?

Dear Matrix Calculus Experts,

Let $n\geq p$ and $x\in\mathbb{R}\rightarrow A(x)\in G_{n,p}(\mathbb{C)}$ be a $C^1$ function where $G_{n,p}$ is the subset of $M_{n,p}$ constituted by the matrices with rank $p$.

Can we differentiate the following function $f:x\rightarrow A(x)(A(x)^*A(x))^{-1} A(x)^*$ ?

So, we need to obtain (Jacobian matrix?), i.e., $$\frac{\partial}{\partial x} \left\{ A(x) \left(A(x)^*A(x)\right)^{-1} A(x)^* \right\}$$ in terms of $\frac{\partial}{\partial x} A(x)$.

Thank you very much in advance.

• You could make the effort to say what $A(x)$ is. – loup blanc May 12 '18 at 21:02
• @loupblanc it is not given – user550103 May 13 '18 at 5:57

Let $M$ denote the Moore-Penrose inverse of $A$, and for ease of typing let $$dA = \frac{dA}{dx}$$ The function you are interested in can be written $$f = AM$$ The derivative of $M$ (in a direction of constant rank) is a well known result $$dM = -M(dA)M + MM^*(dA^*)(I-AM) + (I-MA)(dA^*)M^*M$$ Therefore the derivative of your function is \eqalign{ df &= d(AM) \cr &= (dA)M + A(dM) \cr &= (dA)M -AM(dA)M + M^*(dA^*)(I-AM) + 0 \cr &= (I-AM)(dA)M + \Big((I-AM)(dA)M\Big)^* \cr }
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/2777826/matrix-derivative-of-ax-leftaxax-right-1-ax-w-r-t-x-wher", "fetch_time": 1575812899000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2019-51/segments/1575540510336.29/warc/CC-MAIN-20191208122818-20191208150818-00505.warc.gz", "warc_record_offset": 442832973, "warc_record_length": 30555, "token_count": 483, "char_count": 1276, "score": 3.921875, "int_score": 4, "crawl": "CC-MAIN-2019-51", "snapshot_type": "latest", "language": "en", "language_score": 0.7631685137748718, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00055-of-00064.parquet"}