1
$\begingroup$

I am trying to constrain an eigenvalue problem. I am aware of the method utilizing the nullspace of the constraint vectors but I was wondering if it would be to use a penalty method for the same purpose. Trying the following at MATLAB/Octave

r = rand(4,4);
r=r' + r;
p=[1, 0,  0 , -1]';
w=10000;
[V, D] = eig(r + w*p*p');
V

does not enforce $p={[1 , 0, 0,-1}]$ for all eigenvectors (components 1 and 4 of the system should have the same value). There seems to be always 1 eigenvector where the 1st and last vector component are the same in value and have opposite signs.

Is there any obvious reason why this is happening and I miss it? Sorry if this is obvious, my linear algebra is a bit rusty.

$\endgroup$

1 Answer 1

1
$\begingroup$

I found the error, I just need to constrain the implied identity matrix on the right-hand-side too:

r = rand(4, 4);
r = r' + r;
p=[1 0 0  -1]';
M = eye(4);
w = 1000; 
[V,D ] = eig(r + w*p*p', M + w*p*p');
V
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.