I have an expression:
$$(Y-Xw-z1)^T(Y-Xw-z1)$$ Where $1$ is a $n\times 1$ column of ones, $w$ and $z$ are constants, and $X$ and $Y$ are matrices. How do I take a partial derivative (lets say with respect to $z$) of this expression?
I have an expression:
$$(Y-Xw-z1)^T(Y-Xw-z1)$$ Where $1$ is a $n\times 1$ column of ones, $w$ and $z$ are constants, and $X$ and $Y$ are matrices. How do I take a partial derivative (lets say with respect to $z$) of this expression?
You can expand out the expression and take partial derivatives as usual $Y^TY - Y^TXw -z Y^T1 - w X^TY + w X^T X w - z w X^T 1 - z 1^TY + z 1^T Xw + z^2 1^1 $