lines 6-57 of file: example/python/numeric/simple_inv_xam.py # {xrst_begin numeric_simple_inv_xam.py} # {xrst_spell # cc # } # {xrst_comment_ch #} # # Example Computing Derivatives of Matrix Inversion # ################################################# # # Problem # ******* # We define # # .. math:: # # A(x) = \left( \begin{array}{cc} # x_0 & x_1 \\ # x_2 & x_3 # \end{array} \right) # # It follows that # # .. math:: # # A^{-1}(x) = # \frac{1}{x_3 * x_0 - x_1 * x_2} # \left( \begin{array}{cc} # x_3 & - x_1 \\ # - x_2 & x_0 # \end{array} \right) # # We define # # .. math:: # # f(x) = (x_3 * x_0 - x_1 * x_2) [ # A_{0,0}^{-1} (x), # A_{0,1}^{-1} (x), # A_{1,0}^{-1} (x), # A_{1,1}^{-1} (x) # ] # = [ x_3, -x_1, -x_2, x_0] # # The following example below check the derivative of :math:`f(x)` # # Source Code # *********** # {xrst_literal # # BEGIN_PYTHON # # END_PYTHON # } # {xrst_end numeric_simple_inv_xam.py}