天天看點

矩陣求導Matrix calculus

Matrix calculus

  1. Derivative of linear function:

    ∂xTa∂x=a

    ∂aTx∂x=a

    ∂xTXb∂X=abT

    ∂xTXTb∂X=baT

  2. Derivative of quadratic function:

    ∂bTXTXc∂X=X(bcT+cbT)

    ∂(Bx+b)TC(Dx+d)∂x=BTC(Dx+d)+DTCT(Bx+b)

    ∂xTBx∂x=(B+BT)x

    ∂bTXTDXc∂X=DTXbcT+DXcbT

  3. Derivative of determinant:

    ∂det[Y]∂x=det[T]tr[Y−1∂Y∂x]

    ∂det[Y]∂Y=det[Y]Y−T

  4. Derivative of log determinant:

    ∂log[det[Y]]∂Y=Y−T

  5. Derivative of inverse:

    ∂Y−1∂x=−Y−1∂Y∂xY−1

  6. Derivative of trace:

    ∂tr[F[X]]∂X=(∂F[X]∂X)T

繼續閱讀