Why are the components of the two eigenvectors not continuous and smooth, when the underlying data is continuous and smooth?
For my research, I measure a 2×2 scattering (S) matrix for a number of frequency points. Each component of the S matrix is complex, but varies smoothly and continuously. I am interested in the inner product of the two eigenvectors of the S matrix, but it is discontinuous due to the components of the eigenvectors behaving oddly. The issue isn’t that the label of which eigenvector is which has swapped, or a phase ambiguity of the eigenvectors. I define the eigenvectors as R1 = (A;B), R2 = (C;D) and choose A and D to be purely real. When the discontinuities in the inner product occur, a few things simultaneously occur. These include the label of eigenvalue 1 and 2 switching, a linear kink in the minima of A and D, a kink and switching of the real parts of B and C, and a kink or discontinuity in the imaginary parts of B and C. The code below and attached data show this behavior. Is there any way to fix this such that both the real and imaginary parts of the eigenvectors stay continuous, and the eigenvalues also be continuous with no switching?
%Experimental Data
load(‘Representative_Data.mat’)
%Eigensolver
for k=1:length(x_pts)
[Right_evec(:,:,k),eval(:,:,k)] = eig(smat(:,:,k));
Eval_1(k) = eval(1,1,k);
Eval_2(k) = eval(2,2,k);
end
%Get rid of eigenvector phase ambiguities
Phase_Component_1 = angle(Right_evec(1,1,:)); %A
Phase_Component_2 = angle(Right_evec(2,2,:)); %D
Right_evec(:,1,:) = Right_evec(:,1,:).*exp(-1i*Phase_Component_1);
Right_evec(:,2,:) = Right_evec(:,2,:).*exp(-1i*Phase_Component_2);
for k=1:length(x_pts)
Inner_Product(k) = Right_evec(:,1,k)’*Right_evec(:,2,k);
end
Marker_size = 20;
%Eigenvalues
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(Eval_1),Marker_size,’filled’); hold on;
scatter(x_pts,imag(Eval_1),Marker_size,’filled’);
scatter(x_pts,real(Eval_2),Marker_size,’filled’);
scatter(x_pts,imag(Eval_2),Marker_size,’filled’);
xlabel(‘Frequency (GHz)’)
ylabel(‘Eigenvalues’)
set(gca,’Fontsize’,26)
legend(‘Re lambda_1′,’Im lambda_1′,’Re lambda_2′,’Im lambda_2’)
grid on; box on;
%Eigenvector Components A and D
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(squeeze(Right_evec(1,1,:))),Marker_size,’filled’); hold on;
scatter(x_pts,real(squeeze(Right_evec(2,2,:))),Marker_size,’filled’);
%scatter(x_pts,imag(squeeze(Right_evec(1,1,:))),Marker_size,’filled’); %Imaginary part specified to be 0
%scatter(x_pts,imag(squeeze(Right_evec(2,2,:))),Marker_size,’filled’); %Imaginary part specified to be 0
xlabel(‘Frequency (GHz)’)
ylabel(‘Eigenvector components’)
set(gca,’Fontsize’,26)
legend(‘Re A’,’Re D’)
grid on; box on;
%Eigenvector Components B and C
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(squeeze(Right_evec(2,1,:))),Marker_size,’filled’); hold on;
scatter(x_pts,imag(squeeze(Right_evec(2,1,:))),Marker_size,’filled’);
scatter(x_pts,real(squeeze(Right_evec(1,2,:))),Marker_size,’filled’);
scatter(x_pts,imag(squeeze(Right_evec(1,2,:))),Marker_size,’filled’);
xlabel(‘Frequency (GHz)’)
ylabel(‘Eigenvector components’)
set(gca,’Fontsize’,26)
legend(‘Re B’,’Im B’,’Re C’,’Im C’)
grid on; box on;
%Inner Product
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(Inner_Product),Marker_size,’filled’); hold on;
%scatter(x_pts,imag(Inner_Product),Marker_size,’filled’); %Imaginary part is properly continuous
xlabel(‘Frequency (GHz)’)
ylabel(‘Re <R_1|R_2>’)
set(gca,’Fontsize’,26)
grid on; box on;For my research, I measure a 2×2 scattering (S) matrix for a number of frequency points. Each component of the S matrix is complex, but varies smoothly and continuously. I am interested in the inner product of the two eigenvectors of the S matrix, but it is discontinuous due to the components of the eigenvectors behaving oddly. The issue isn’t that the label of which eigenvector is which has swapped, or a phase ambiguity of the eigenvectors. I define the eigenvectors as R1 = (A;B), R2 = (C;D) and choose A and D to be purely real. When the discontinuities in the inner product occur, a few things simultaneously occur. These include the label of eigenvalue 1 and 2 switching, a linear kink in the minima of A and D, a kink and switching of the real parts of B and C, and a kink or discontinuity in the imaginary parts of B and C. The code below and attached data show this behavior. Is there any way to fix this such that both the real and imaginary parts of the eigenvectors stay continuous, and the eigenvalues also be continuous with no switching?
%Experimental Data
load(‘Representative_Data.mat’)
%Eigensolver
for k=1:length(x_pts)
[Right_evec(:,:,k),eval(:,:,k)] = eig(smat(:,:,k));
Eval_1(k) = eval(1,1,k);
Eval_2(k) = eval(2,2,k);
end
%Get rid of eigenvector phase ambiguities
Phase_Component_1 = angle(Right_evec(1,1,:)); %A
Phase_Component_2 = angle(Right_evec(2,2,:)); %D
Right_evec(:,1,:) = Right_evec(:,1,:).*exp(-1i*Phase_Component_1);
Right_evec(:,2,:) = Right_evec(:,2,:).*exp(-1i*Phase_Component_2);
for k=1:length(x_pts)
Inner_Product(k) = Right_evec(:,1,k)’*Right_evec(:,2,k);
end
Marker_size = 20;
%Eigenvalues
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(Eval_1),Marker_size,’filled’); hold on;
scatter(x_pts,imag(Eval_1),Marker_size,’filled’);
scatter(x_pts,real(Eval_2),Marker_size,’filled’);
scatter(x_pts,imag(Eval_2),Marker_size,’filled’);
xlabel(‘Frequency (GHz)’)
ylabel(‘Eigenvalues’)
set(gca,’Fontsize’,26)
legend(‘Re lambda_1′,’Im lambda_1′,’Re lambda_2′,’Im lambda_2’)
grid on; box on;
%Eigenvector Components A and D
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(squeeze(Right_evec(1,1,:))),Marker_size,’filled’); hold on;
scatter(x_pts,real(squeeze(Right_evec(2,2,:))),Marker_size,’filled’);
%scatter(x_pts,imag(squeeze(Right_evec(1,1,:))),Marker_size,’filled’); %Imaginary part specified to be 0
%scatter(x_pts,imag(squeeze(Right_evec(2,2,:))),Marker_size,’filled’); %Imaginary part specified to be 0
xlabel(‘Frequency (GHz)’)
ylabel(‘Eigenvector components’)
set(gca,’Fontsize’,26)
legend(‘Re A’,’Re D’)
grid on; box on;
%Eigenvector Components B and C
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(squeeze(Right_evec(2,1,:))),Marker_size,’filled’); hold on;
scatter(x_pts,imag(squeeze(Right_evec(2,1,:))),Marker_size,’filled’);
scatter(x_pts,real(squeeze(Right_evec(1,2,:))),Marker_size,’filled’);
scatter(x_pts,imag(squeeze(Right_evec(1,2,:))),Marker_size,’filled’);
xlabel(‘Frequency (GHz)’)
ylabel(‘Eigenvector components’)
set(gca,’Fontsize’,26)
legend(‘Re B’,’Im B’,’Re C’,’Im C’)
grid on; box on;
%Inner Product
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(Inner_Product),Marker_size,’filled’); hold on;
%scatter(x_pts,imag(Inner_Product),Marker_size,’filled’); %Imaginary part is properly continuous
xlabel(‘Frequency (GHz)’)
ylabel(‘Re <R_1|R_2>’)
set(gca,’Fontsize’,26)
grid on; box on; For my research, I measure a 2×2 scattering (S) matrix for a number of frequency points. Each component of the S matrix is complex, but varies smoothly and continuously. I am interested in the inner product of the two eigenvectors of the S matrix, but it is discontinuous due to the components of the eigenvectors behaving oddly. The issue isn’t that the label of which eigenvector is which has swapped, or a phase ambiguity of the eigenvectors. I define the eigenvectors as R1 = (A;B), R2 = (C;D) and choose A and D to be purely real. When the discontinuities in the inner product occur, a few things simultaneously occur. These include the label of eigenvalue 1 and 2 switching, a linear kink in the minima of A and D, a kink and switching of the real parts of B and C, and a kink or discontinuity in the imaginary parts of B and C. The code below and attached data show this behavior. Is there any way to fix this such that both the real and imaginary parts of the eigenvectors stay continuous, and the eigenvalues also be continuous with no switching?
%Experimental Data
load(‘Representative_Data.mat’)
%Eigensolver
for k=1:length(x_pts)
[Right_evec(:,:,k),eval(:,:,k)] = eig(smat(:,:,k));
Eval_1(k) = eval(1,1,k);
Eval_2(k) = eval(2,2,k);
end
%Get rid of eigenvector phase ambiguities
Phase_Component_1 = angle(Right_evec(1,1,:)); %A
Phase_Component_2 = angle(Right_evec(2,2,:)); %D
Right_evec(:,1,:) = Right_evec(:,1,:).*exp(-1i*Phase_Component_1);
Right_evec(:,2,:) = Right_evec(:,2,:).*exp(-1i*Phase_Component_2);
for k=1:length(x_pts)
Inner_Product(k) = Right_evec(:,1,k)’*Right_evec(:,2,k);
end
Marker_size = 20;
%Eigenvalues
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(Eval_1),Marker_size,’filled’); hold on;
scatter(x_pts,imag(Eval_1),Marker_size,’filled’);
scatter(x_pts,real(Eval_2),Marker_size,’filled’);
scatter(x_pts,imag(Eval_2),Marker_size,’filled’);
xlabel(‘Frequency (GHz)’)
ylabel(‘Eigenvalues’)
set(gca,’Fontsize’,26)
legend(‘Re lambda_1′,’Im lambda_1′,’Re lambda_2′,’Im lambda_2’)
grid on; box on;
%Eigenvector Components A and D
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(squeeze(Right_evec(1,1,:))),Marker_size,’filled’); hold on;
scatter(x_pts,real(squeeze(Right_evec(2,2,:))),Marker_size,’filled’);
%scatter(x_pts,imag(squeeze(Right_evec(1,1,:))),Marker_size,’filled’); %Imaginary part specified to be 0
%scatter(x_pts,imag(squeeze(Right_evec(2,2,:))),Marker_size,’filled’); %Imaginary part specified to be 0
xlabel(‘Frequency (GHz)’)
ylabel(‘Eigenvector components’)
set(gca,’Fontsize’,26)
legend(‘Re A’,’Re D’)
grid on; box on;
%Eigenvector Components B and C
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(squeeze(Right_evec(2,1,:))),Marker_size,’filled’); hold on;
scatter(x_pts,imag(squeeze(Right_evec(2,1,:))),Marker_size,’filled’);
scatter(x_pts,real(squeeze(Right_evec(1,2,:))),Marker_size,’filled’);
scatter(x_pts,imag(squeeze(Right_evec(1,2,:))),Marker_size,’filled’);
xlabel(‘Frequency (GHz)’)
ylabel(‘Eigenvector components’)
set(gca,’Fontsize’,26)
legend(‘Re B’,’Im B’,’Re C’,’Im C’)
grid on; box on;
%Inner Product
figure(‘Position’,[200,100,1500,730]);
scatter(x_pts,real(Inner_Product),Marker_size,’filled’); hold on;
%scatter(x_pts,imag(Inner_Product),Marker_size,’filled’); %Imaginary part is properly continuous
xlabel(‘Frequency (GHz)’)
ylabel(‘Re <R_1|R_2>’)
set(gca,’Fontsize’,26)
grid on; box on; eigenvectors MATLAB Answers — New Questions