[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-348117-105":3,"doc-detail-348117-en":81,"detail-sidebar-cat-0-en-105":103},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","matrix-calculus-chain-rule-and-denominator-layout-exercises","Matrix Calculus - Chain Rule and Denominator Layout Exercises","","In-class exercises on matrix calculus focus on writing derivatives of multivariate or matrix-valued functions in a matrix grid and using the resulting chain rule to simplify computations. The material contrasts competing Jacobian and gradient conventions and selects the denominator layout. It extends the definition to vector-to-vector, scalar-to-matrix, and matrix-to-scalar settings, then summarizes key derivative mappings and establishes the chain rule for this convention. Worked examples and exercises cover product rules and derivative dimensions across scalar, vector, and matrix compositions, with notes on limitations requiring higher-order tensors.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/matrix-calculus-chain-rule-and-denominator-layout-exercises/348117/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/matrix-calculus-chain-rule-and-denominator-layout-exercises/348117.png","ImageObject",300,407,{"name":42,"@type":43},"Connor ","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-27","2026-09-22",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",18,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is the denominator layout in matrix calculus and why is it used here?","Question",{"text":63,"@type":64},"The denominator layout organizes partial derivatives so that multivariate or matrix-valued derivatives form a structured matrix grid. The exercise chooses this convention to keep the chain rule consistent for the presented calculations.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What does the chain rule for denominator layout look like conceptually?",{"text":68,"@type":64},"The chain rule connects the derivative of a composed function to the derivatives of the outer function and the inner function via matrix-form multiplication. This rule serves as the base from which other differentiation rules can be derived.",{"name":70,"@type":61,"acceptedAnswer":71},"Why can some derivatives exceed what matrix calculus can handle directly?",{"text":72,"@type":64},"When applying the chain rule to expressions like scalar dependent on a matrix expression, the derivative can become vector-by-matrix, which would require tensor representations. The notes explain bypassing the tensor issue by working component-wise.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},348117,1790519559,{"code":4,"msg":82,"data":83},"success",{"doc_id":79,"user_id":84,"nickname":42,"user_avatar":85,"doc_module":4,"category_id":86,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":87,"file_id":88,"file_url":89,"file_type":90,"file_size":91,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":30,"language":92,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":93,"faqs":94,"seo_title":95,"seo_description":12,"update_tm":96,"read_time":97,"preview_page_count":22,"preview_urls":98},687207022233,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d",6,"In class exercises for CW 43  \nThe idea of matrix calculus is to write down the partial derivatives of multivariate/multivalued functions into a matrix grid. This notation gives rise to a powerful chain rule which simpliﬁes many calculations. However there is a caveat: two competing systems are in wide spread use. For a vector to vector function f : Rn ! Rm some people prefer to work the Jacobian, others with the gradient.  \nNumerator layout Denominator layout  \n􀀐 ~~@~~@~~f~~x 􀀑  \n􀀐 ~~@~~@~~f~~x 􀀑  \nij  \nij  \n= @fi  \n@xj  \n@fj =  \n@xi  \n\"Jacobian way\"  \n\"Gradient way\"  \nFor the purpose of this exercise we will stick to the denominator layout  \nThe base deﬁnition can be extended to the case of matrix-valued functions of one variable and matrix dependent scalar functions:  \nDeﬁnition 1 . Consider functions f : Rn ! Rm; x 7! f (x) (vector to vector), Y : R ! Rm􀀂 n ; t 7! Y (t)(scalar to matrix) and 􀀞 : Rm􀀂 n ! R; X 7! 􀀞 (X) (matrix to scalar) . The denominator convention consists of the following convections:  \n@f 0 ~~@~~@~~f 1~~x~~ ~~1~~ ~~ 􀀁 􀀁 􀀁 ~~ @~~@~~fm~~x1~~ ~~ 1  \n~~ ~~ = B.. . . .. C  \n@x @ .~~@~~@~~f 1~~x~~ ~~n~~ ~~ 􀀁 􀀁 􀀁. .~~@~~@~~fm~~x~~ ~~n A  \n@Y  0 ~~@~~Y@~~11~~t~~ ~~ 􀀁 􀀁 􀀁 ~~ @~~Y@~~1~~t~~n~~ 1  \n= B.. . . .. C  \n@t @ .~~@~~Y@~~m~~t~~1 ~~ 􀀁 􀀁 􀀁. .~~@~~Y~~m~~@t~~n~~A  \n@􀀞 0 @~~@􀀞~~X11~~ ~~ 􀀁 􀀁 􀀁 ~~ ~~@~~@􀀞~~X1n 1  \n~~ ~~ = B.. . . .. C  \n@X @ .@~~@~~X~~􀀞~~m1~~ ~~ 􀀁 􀀁 􀀁. .@~~@~~X~~􀀞~~mn A  \nRemark 2. Using matrix calculus we can write down the following derivatives in concise form:  \n\n| x n f | scalar | vector | matrix |\n| --- | --- | --- | --- |\n| scalar | X | X | X |\n| vector | X | X | 􀀂 |\n| matrix | X | 􀀂 | 􀀂 |\n\nThe missing ones would require to write the entries not in a matrix, but in higher dimensional analogues (tensors) .  \nTheorem 3 (Chain Rule for denominator layout) .  \n@ (f 􀀎 g)  @g   @ (f 􀀎 g)  \n= 􀀁  \n@x @x @g  \nx  g   \nf 􀀎g   \ny  \n f (1)  \nz  \nM.Sc. Randolf Scholz 1/3 Prof. Dr. Dr. Lars Schmidt-Thieme  \nNote: In the case 'scalar by matrix' the order is swapped: @~~ ~~(f@􀀎Xg) = @~~ ~~(f@􀀎gg) 􀀁 ~~@~~@~~g~~X . If numerator layout is used instead, the order is always @~~ ~~(f@􀀎xg) = @~~ ~~(f@􀀎gg) 􀀁 ~~@~~@~~g~~x . 1  \nExercise 4 . Assume g : Rn ! Rk and f : Rk ! Rm what are dims. of @~~ ~~(f@􀀎xg) ; ~~@~~@~~g~~x and ~~@f~~@􀀎g~~g~~ ?  \nThe chain rule is in some sense the most important diﬀerentiation rule, since all other diﬀerentiation rules can be derived from it.  \nExample 5 . The one dimensional product rule is ~~@~~@x (uv) = u0 v + v0 u. Proof:  \nx  \n( uv )  \nf  \nuv  \n@ (f 􀀎 g)  @g   @ (f 􀀎 g)  \n= 􀀁  \n@x @x @g  \n= 􀀀u0 v0 􀀁􀀁 􀀒vu􀀓 = u0 v + v0 u  \nExercise 6 (scalar by vector) . Let a; x 2 Rn and u; v : Rn ! Rm be functions of x  \n􀀏 ~~@~~@x (a| x) and ~~@~~@x (x| a) (sol: a and a)  \n􀀏 Show that ~~@~~@x (u| v) = ~~@~~@~~u~~xv + ~~@~~@~~v~~xu (scalar product rule)  \n􀀏 Compute ~~@~~@x kxk22 (sol: 2x) Exercise 7 (vector by vector) .  \n􀀏 ~~@~~@x (Ax) and @~~@~~y (y| A) (sol: A| and sol: A)  \n􀀏 ~~@~~@x ~~1~~2 ky 􀀀 Axk22 (sol: A| Ax 􀀀 A|y)  \nExercise 8 (scalar by matrix) . Let x 2 Rn; y 2 Rm ; A 2 Rm􀀂 n and 􀀞 : Rm ! R  \n􀀏 Compute @~~@~~Ay | Ax (sol: yx| )  \n􀀏 Compute @~~@~~A􀀞 (Ax) (sol: r􀀞[Ax] 􀀁 x| ) (Hint: This exercise goes beyond what matrix calculus is able to handle. After applying the chain rule the derivative ~~@~~A@A~~x~~ arises which is of type vector-by-matrix. Fundamentally it would need to represented by a 3-dimensional tensor. We can bypass this issue by writing Ax = Pi(e|iAx)ei and form the derivative component wise.)  \n1 This can be seen as a fundamental ﬂaw of the denominator convention. To ﬁx it one would have toredeﬁne ( @@fX )ij = @@fXji , which is counter-intuitive.  \nM.Sc. Randolf Scholz 2/3 Prof. Dr. Dr. Lars Schmidt-Thieme  \nLiterature Recommendation  \nBasic multivariate calculus can be found in almost any appropriate undergraduate text. Two on-line sources that summarize vectorized multivariate calculus and can be used to look up formulas are:  \n􀀏 Wikipedia page on Matrix Calculus 2  \n􀀏 Mat","cbCaimYq0YelfhAq","https://ap.wps.com/l/cbCaimYq0YelfhAq","pdf",322884,"English","# Denominator vs. Jacobian/Gradient Layout\n## Denominator convention overview\n## Extended definitions and derivative mappings\n# Chain Rule for denominator layout\n## Product rule example\n# Exercises by input/output types\n## Scalar by vector\n## Vector by vector\n## Scalar by matrix\n# Limitations and literature recommendation","[{\"question\":\"What is the denominator layout in matrix calculus and why is it used here?\",\"answer\":\"The denominator layout organizes partial derivatives so that multivariate or matrix-valued derivatives form a structured matrix grid. The exercise chooses this convention to keep the chain rule consistent for the presented calculations.\"},{\"question\":\"What does the chain rule for denominator layout look like conceptually?\",\"answer\":\"The chain rule connects the derivative of a composed function to the derivatives of the outer function and the inner function via matrix-form multiplication. This rule serves as the base from which other differentiation rules can be derived.\"},{\"question\":\"Why can some derivatives exceed what matrix calculus can handle directly?\",\"answer\":\"When applying the chain rule to expressions like scalar dependent on a matrix expression, the derivative can become vector-by-matrix, which would require tensor representations. The notes explain bypassing the tensor issue by working component-wise.\"}]","Matrix Calculus - Chain Rule and Denominator Layout Exercises | PDF",1790071210,8,[99],{"page_no":22,"url":100,"width":101,"height":102},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-08/bac2ace707ba18a4b6feec5532aa4e06.webp",983,1390,{"code":4,"msg":82,"data":104},[105,109,113,117,122,125,130,134,139,142,146],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":110,"show_sort_weight":111,"slug":112},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":114,"show_sort_weight":115,"slug":116},"Exam",70,"exam",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":119,"show_sort_weight":120,"slug":121},5,"Comic",60,"comic",{"id":86,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":123,"slug":124},50,"technology",{"id":126,"doc_module":4,"doc_module_name":25,"category_name":127,"show_sort_weight":128,"slug":129},7,"Healthcare",40,"healthcare",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":131,"show_sort_weight":132,"slug":133},"Research & Report",30,"research-report",{"id":135,"doc_module":4,"doc_module_name":25,"category_name":136,"show_sort_weight":137,"slug":138},9,"Religion & Spirituality",20,"religion-spirituality",{"id":137,"doc_module":4,"doc_module_name":25,"category_name":140,"show_sort_weight":137,"slug":141},"World Cup","world-cup",{"id":143,"doc_module":4,"doc_module_name":25,"category_name":144,"show_sort_weight":143,"slug":145},10,"Lifestyle","lifestyle",{"id":147,"doc_module":4,"doc_module_name":25,"category_name":148,"show_sort_weight":118,"slug":149},19,"General","general"]