Skip to main content
deleted 134 characters in body
Source Link

The characteristic equation of a matrix A\$A\$ is defined by

det| A - λI | = 0 

$$\det| A - λI | = 0$$

where λ\$λ\$ is a complex (scalar) parameter, I\$I\$ is the identity matrix and det|...|\$\det|...|\$ is the determinant. The left-hand side evaluates to a polynomial in λ\$λ\$, the characteristic polynomial, which is quadratic in the case of 2x2 matrices. The solutions of this characteristic equation are the eigenvalues of A\$A\$, which we will denote as λ1\$λ_1\$ and λ2\$λ_2\$.

Now the eigenvectors vi\$v_i\$ of A\$A\$ satisfy

A vi = λi vi

$$Av_i = λ_iv_i$$

For each λi\$λ_i\$, this gives you a system of two equations in two unknowns (the components of vi\$v_i\$), which can be solved quite easily. You will notice that the system is actually underspecified, and the magnitude of the eigenvectors are not determined by the equations. We will usually want the eigenvectors to be normalised, that is √(|x|2 + |y|2) = 1\$\sqrt{|x|^2 + |y|^2} = 1\$, where x\$x\$ and y\$y\$ are the vector components, |x|2\$|x|^2\$ is x\$x\$ multiplied by its complex conjugate.

Note that the eigenvalues may be degenerate, i.e. λ1 = λ2\$λ_1 = λ_2\$. In this case, you may or may not be able to satisfy the single system of equations with two linearly independent eigenvectors.

Given a 2x2 matrix with complex elements, determine its two (possibly identical) eigenvalues and a normalised eigenvector for each eigenvalue. The resulting numbers must be accurate to at least 3 (decimal) significant digits. You may assume that the real and imaginary parts of any matrix element is in the range [-1,1]\$[-1,1]\$.

The characteristic equation of a matrix A is defined by

det| A - λI | = 0 

where λ is a complex (scalar) parameter, I is the identity matrix and det|...| is the determinant. The left-hand side evaluates to a polynomial in λ, the characteristic polynomial, which is quadratic in the case of 2x2 matrices. The solutions of this characteristic equation are the eigenvalues of A, which we will denote as λ1 and λ2.

Now the eigenvectors vi of A satisfy

A vi = λi vi

For each λi, this gives you a system of two equations in two unknowns (the components of vi), which can be solved quite easily. You will notice that the system is actually underspecified, and the magnitude of the eigenvectors are not determined by the equations. We will usually want the eigenvectors to be normalised, that is √(|x|2 + |y|2) = 1, where x and y are the vector components, |x|2 is x multiplied by its complex conjugate.

Note that the eigenvalues may be degenerate, i.e. λ1 = λ2. In this case, you may or may not be able to satisfy the single system of equations with two linearly independent eigenvectors.

Given a 2x2 matrix with complex elements, determine its two (possibly identical) eigenvalues and a normalised eigenvector for each eigenvalue. The resulting numbers must be accurate to at least 3 (decimal) significant digits. You may assume that the real and imaginary parts of any matrix element is in the range [-1,1].

The characteristic equation of a matrix \$A\$ is defined by

$$\det| A - λI | = 0$$

where \$λ\$ is a complex (scalar) parameter, \$I\$ is the identity matrix and \$\det|...|\$ is the determinant. The left-hand side evaluates to a polynomial in \$λ\$, the characteristic polynomial, which is quadratic in the case of 2x2 matrices. The solutions of this characteristic equation are the eigenvalues of \$A\$, which we will denote as \$λ_1\$ and \$λ_2\$.

Now the eigenvectors \$v_i\$ of \$A\$ satisfy

$$Av_i = λ_iv_i$$

For each \$λ_i\$, this gives you a system of two equations in two unknowns (the components of \$v_i\$), which can be solved quite easily. You will notice that the system is actually underspecified, and the magnitude of the eigenvectors are not determined by the equations. We will usually want the eigenvectors to be normalised, that is \$\sqrt{|x|^2 + |y|^2} = 1\$, where \$x\$ and \$y\$ are the vector components, \$|x|^2\$ is \$x\$ multiplied by its complex conjugate.

Note that the eigenvalues may be degenerate, i.e. \$λ_1 = λ_2\$. In this case, you may or may not be able to satisfy the single system of equations with two linearly independent eigenvectors.

Given a 2x2 matrix with complex elements, determine its two (possibly identical) eigenvalues and a normalised eigenvector for each eigenvalue. The resulting numbers must be accurate to at least 3 (decimal) significant digits. You may assume that the real and imaginary parts of any matrix element is in the range \$[-1,1]\$.

Notice removed Reward existing answer by Adám
Bounty Ended with rak1507's answer chosen by Adám
Notice added Reward existing answer by Adám
Bounty Started worth 200 reputation by Adám
Notice removed Reward existing answer by user
Bounty Ended with rak1507's answer chosen by user
Notice added Reward existing answer by user
Bounty Started worth 250 reputation by user
edited tags
Link
Wheat Wizard
  • 102.9k
  • 23
  • 299
  • 698
Tweeted twitter.com/#!/StackCodeGolf/status/559628660765122560
added 4 characters in body
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999

For each λi, this gives you a system of two equations in two unknowns (the components of vi), which can be solved quite easily. You will notice that the system is actually underspecified, and the magnitude of the eigenvectors are not determined by the equations. We will usually want the eigenvectors to be normalised, that is √(|x|2 + |y|2) = 1, where x and y are the vector components, |x|2 is x multiplied by its complex conjugate.

For each λi, this gives you a system of two equations in two unknowns (the components of vi), which can be solved quite easily. You will notice that the system is actually underspecified, and the magnitude of the eigenvectors are not determined by the equations. We will usually want the eigenvectors to be normalised, that is √(|x|2 + |y|2) = 1, where x and y are the vector components.

For each λi, this gives you a system of two equations in two unknowns (the components of vi), which can be solved quite easily. You will notice that the system is actually underspecified, and the magnitude of the eigenvectors are not determined by the equations. We will usually want the eigenvectors to be normalised, that is √(|x|2 + |y|2) = 1, where x and y are the vector components, |x|2 is x multiplied by its complex conjugate.

added 4 characters in body
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999
Loading
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999
Loading