Hello @Juheon_Chu,
The purpose of sharing this toy example is as a reference for you to make your own example for the context you concern about.
The key idea of my example is to establish the context with
- the equations for L, Z, W and A (step 1 & 2)
- some small matrices W and A for easy calculation (step 1)
Step 3 essentially expands any matrix multiplication that ends up with an equation with only scalars on both side. This is important, because, with only scalars, you can use scalar calculus.
Then, without loss of generality, you can examine one of the derivative of interest (step 4), and figure out a form (step 6) that will give you consistent result with step 4.
If you google “matrix calculus”, you will see tutorial PDFs by colleges like Imperial College London and University of Minnesota. They proved some rules for derivative with matrices, but behind the proofs, one core idea is to break things down to scalars like I did in step 3.
You might not be able to find the exact rule you are looking for in those PDFs, but you can modify my toy example to create one for your own.
This is a DIY process, @Juheon_Chu If you can’t google the exact needed rule out, I think it’s time for you to work your toy example out on a piece of paper. You write everything down clearly, do the calculations step-by-step, and it will bring you to good result! That’s why we learn maths!
Feel free to share your work like the way I did in those steps, so we can discuss it. Remember to use small and simple matrices, and better if no dimension’s size is larger than 2 so that we won’t get flooded by too many numbers and symbols.
Cheers,
Raymond