Derivative of a transpose variable [duplicate]
up vote
0
down vote
favorite
This question already has an answer here:
Differentiate $f(x)=x^TAx$
3 answers
I'm trying to solve the derivative of an equation that has a transpose (calculation of a multivariate distribution : trying to calculate the mean)
d/dx (x(T)Ax), where x is a vector, x(T) is the transpose of x, A is a Matrix.
According to the answer sheet, the answer is 2A*x.
Does this mean that x(T) is the same value of x, so x(T)Ax ==> Ax^2?
statistics derivatives transpose
marked as duplicate by StubbornAtom, user10354138, Cesareo, Lord Shark the Unknown, Chinnapparaj R Nov 21 at 3:59
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
0
down vote
favorite
This question already has an answer here:
Differentiate $f(x)=x^TAx$
3 answers
I'm trying to solve the derivative of an equation that has a transpose (calculation of a multivariate distribution : trying to calculate the mean)
d/dx (x(T)Ax), where x is a vector, x(T) is the transpose of x, A is a Matrix.
According to the answer sheet, the answer is 2A*x.
Does this mean that x(T) is the same value of x, so x(T)Ax ==> Ax^2?
statistics derivatives transpose
marked as duplicate by StubbornAtom, user10354138, Cesareo, Lord Shark the Unknown, Chinnapparaj R Nov 21 at 3:59
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
Think about what it means to take the derivative with respect to a vector. Do you know index notation? If you do try writing everything in index notation. Also, I believe there is a condition you forgot to mention. The matrix $A$ should be symetric for that answer to be true.
– Daniel Gendin
Nov 19 at 21:26
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
Differentiate $f(x)=x^TAx$
3 answers
I'm trying to solve the derivative of an equation that has a transpose (calculation of a multivariate distribution : trying to calculate the mean)
d/dx (x(T)Ax), where x is a vector, x(T) is the transpose of x, A is a Matrix.
According to the answer sheet, the answer is 2A*x.
Does this mean that x(T) is the same value of x, so x(T)Ax ==> Ax^2?
statistics derivatives transpose
This question already has an answer here:
Differentiate $f(x)=x^TAx$
3 answers
I'm trying to solve the derivative of an equation that has a transpose (calculation of a multivariate distribution : trying to calculate the mean)
d/dx (x(T)Ax), where x is a vector, x(T) is the transpose of x, A is a Matrix.
According to the answer sheet, the answer is 2A*x.
Does this mean that x(T) is the same value of x, so x(T)Ax ==> Ax^2?
This question already has an answer here:
Differentiate $f(x)=x^TAx$
3 answers
statistics derivatives transpose
statistics derivatives transpose
asked Nov 19 at 21:13
Robert
62
62
marked as duplicate by StubbornAtom, user10354138, Cesareo, Lord Shark the Unknown, Chinnapparaj R Nov 21 at 3:59
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by StubbornAtom, user10354138, Cesareo, Lord Shark the Unknown, Chinnapparaj R Nov 21 at 3:59
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
Think about what it means to take the derivative with respect to a vector. Do you know index notation? If you do try writing everything in index notation. Also, I believe there is a condition you forgot to mention. The matrix $A$ should be symetric for that answer to be true.
– Daniel Gendin
Nov 19 at 21:26
add a comment |
1
Think about what it means to take the derivative with respect to a vector. Do you know index notation? If you do try writing everything in index notation. Also, I believe there is a condition you forgot to mention. The matrix $A$ should be symetric for that answer to be true.
– Daniel Gendin
Nov 19 at 21:26
1
1
Think about what it means to take the derivative with respect to a vector. Do you know index notation? If you do try writing everything in index notation. Also, I believe there is a condition you forgot to mention. The matrix $A$ should be symetric for that answer to be true.
– Daniel Gendin
Nov 19 at 21:26
Think about what it means to take the derivative with respect to a vector. Do you know index notation? If you do try writing everything in index notation. Also, I believe there is a condition you forgot to mention. The matrix $A$ should be symetric for that answer to be true.
– Daniel Gendin
Nov 19 at 21:26
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Its not right to say $x^T A x= Ax^2$ as $x^2$ doesn't make sense when $x$ is a vector. Instead you can write
$$
x^T A x = sum_{i=1}^n sum_{j=1}^n (x_i A_{ij} x_j)
$$
Differentiating with the product rule you get
$$
frac{partial}{partial x_ell} x^T A x =sum_{i=1}^n sum_{j=1}^n left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j +sum_{i=1}^n sum_{j=1}^n x_i A_{ij} left(frac{partial}{partial x_ell} x_j right).
$$
Then use $frac{partial x_i}{partial x_ell}=1$ if $i=ell$ and $0$ otherwise to simplify the first term to
$$
left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j= sum_{j=1}^n A_{ell j} x_ell.
$$
The second term simplifies in a similar manner. Can you say what $sum_{j=1}^n A_{ell j} x_ell$ is in terms of a product of $A$ and $x?$
Also, does the problem assume the matrix is symmetric? The derivative in the general case is $(A+A^T)x$.
Indeed, the problem assume that the matrix is symmetric and defined positively!
– Robert
Nov 20 at 1:15
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Its not right to say $x^T A x= Ax^2$ as $x^2$ doesn't make sense when $x$ is a vector. Instead you can write
$$
x^T A x = sum_{i=1}^n sum_{j=1}^n (x_i A_{ij} x_j)
$$
Differentiating with the product rule you get
$$
frac{partial}{partial x_ell} x^T A x =sum_{i=1}^n sum_{j=1}^n left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j +sum_{i=1}^n sum_{j=1}^n x_i A_{ij} left(frac{partial}{partial x_ell} x_j right).
$$
Then use $frac{partial x_i}{partial x_ell}=1$ if $i=ell$ and $0$ otherwise to simplify the first term to
$$
left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j= sum_{j=1}^n A_{ell j} x_ell.
$$
The second term simplifies in a similar manner. Can you say what $sum_{j=1}^n A_{ell j} x_ell$ is in terms of a product of $A$ and $x?$
Also, does the problem assume the matrix is symmetric? The derivative in the general case is $(A+A^T)x$.
Indeed, the problem assume that the matrix is symmetric and defined positively!
– Robert
Nov 20 at 1:15
add a comment |
up vote
1
down vote
Its not right to say $x^T A x= Ax^2$ as $x^2$ doesn't make sense when $x$ is a vector. Instead you can write
$$
x^T A x = sum_{i=1}^n sum_{j=1}^n (x_i A_{ij} x_j)
$$
Differentiating with the product rule you get
$$
frac{partial}{partial x_ell} x^T A x =sum_{i=1}^n sum_{j=1}^n left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j +sum_{i=1}^n sum_{j=1}^n x_i A_{ij} left(frac{partial}{partial x_ell} x_j right).
$$
Then use $frac{partial x_i}{partial x_ell}=1$ if $i=ell$ and $0$ otherwise to simplify the first term to
$$
left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j= sum_{j=1}^n A_{ell j} x_ell.
$$
The second term simplifies in a similar manner. Can you say what $sum_{j=1}^n A_{ell j} x_ell$ is in terms of a product of $A$ and $x?$
Also, does the problem assume the matrix is symmetric? The derivative in the general case is $(A+A^T)x$.
Indeed, the problem assume that the matrix is symmetric and defined positively!
– Robert
Nov 20 at 1:15
add a comment |
up vote
1
down vote
up vote
1
down vote
Its not right to say $x^T A x= Ax^2$ as $x^2$ doesn't make sense when $x$ is a vector. Instead you can write
$$
x^T A x = sum_{i=1}^n sum_{j=1}^n (x_i A_{ij} x_j)
$$
Differentiating with the product rule you get
$$
frac{partial}{partial x_ell} x^T A x =sum_{i=1}^n sum_{j=1}^n left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j +sum_{i=1}^n sum_{j=1}^n x_i A_{ij} left(frac{partial}{partial x_ell} x_j right).
$$
Then use $frac{partial x_i}{partial x_ell}=1$ if $i=ell$ and $0$ otherwise to simplify the first term to
$$
left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j= sum_{j=1}^n A_{ell j} x_ell.
$$
The second term simplifies in a similar manner. Can you say what $sum_{j=1}^n A_{ell j} x_ell$ is in terms of a product of $A$ and $x?$
Also, does the problem assume the matrix is symmetric? The derivative in the general case is $(A+A^T)x$.
Its not right to say $x^T A x= Ax^2$ as $x^2$ doesn't make sense when $x$ is a vector. Instead you can write
$$
x^T A x = sum_{i=1}^n sum_{j=1}^n (x_i A_{ij} x_j)
$$
Differentiating with the product rule you get
$$
frac{partial}{partial x_ell} x^T A x =sum_{i=1}^n sum_{j=1}^n left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j +sum_{i=1}^n sum_{j=1}^n x_i A_{ij} left(frac{partial}{partial x_ell} x_j right).
$$
Then use $frac{partial x_i}{partial x_ell}=1$ if $i=ell$ and $0$ otherwise to simplify the first term to
$$
left(frac{partial}{partial x_ell} x_iright) A_{ij} x_j= sum_{j=1}^n A_{ell j} x_ell.
$$
The second term simplifies in a similar manner. Can you say what $sum_{j=1}^n A_{ell j} x_ell$ is in terms of a product of $A$ and $x?$
Also, does the problem assume the matrix is symmetric? The derivative in the general case is $(A+A^T)x$.
answered Nov 19 at 21:34
Eric
1958
1958
Indeed, the problem assume that the matrix is symmetric and defined positively!
– Robert
Nov 20 at 1:15
add a comment |
Indeed, the problem assume that the matrix is symmetric and defined positively!
– Robert
Nov 20 at 1:15
Indeed, the problem assume that the matrix is symmetric and defined positively!
– Robert
Nov 20 at 1:15
Indeed, the problem assume that the matrix is symmetric and defined positively!
– Robert
Nov 20 at 1:15
add a comment |
1
Think about what it means to take the derivative with respect to a vector. Do you know index notation? If you do try writing everything in index notation. Also, I believe there is a condition you forgot to mention. The matrix $A$ should be symetric for that answer to be true.
– Daniel Gendin
Nov 19 at 21:26