I have the following system.
$AW = \lambda B W$
Where $A,B,W$ are matrices and $\lambda$ is a scalar. The values of $A,B$ and $\lambda$ are known. $B$ is invertible.
This is a solution to an optimization problem, where I am trying to find $W$ by setting $\frac{\partial J}{\partial W} = 0$.
How can I find the solution of W? (could you provide any references?) Any easy way to implement it in Matlab?
Note that $$ AW = \lambda BW \implies\\ (A - \lambda B)W = 0 $$ Thus, to find $W$, we should simply ensure that each column $x$ of $W$ is a solution to the homogeneous system of equations $$ (A - \lambda B)x = 0 $$ In Matlab, use
null(A - lambda * B)to find a basis to this solutions space.