2
$\begingroup$

I am asked to identify from a list of vectors if any of them are eigenvectors of a given matrix. I have applied what it is explained in:

Verify a vector is an eigenvector of a matrix

It is indicated to inspect visually if the dot product of the matrix times the corresponding vector is equivalent to multiply the vector times an scalar. In the following Python code the matrix is identified as A, and the vectors as a, b, c, and d. The dot products are calculated and printed.

import numpy as np
A = np.matrix([[3,0],[4,5]])
a = np.array([3,0])
b = np.array([0,0])
c = np.array([-1,-1/2])
d = np.array([2,1])
print ("Is np.dot(A,a):",np.dot(A,a), "equivalent to multiply a:",a,"by
an scalar?")

The final question is repeated for each vector.

I have difficulties to identify the correct answer.

For example, for the first vector (a = [3,0]) I obtain the corresponding transformed vector [ 9, 12], that is, the dot product of the matrix A times the vector a, but I am not able to answer if it is also the result of multiplying the vector by any scalar.

How do I know if a given vector is the scalar multiple of another one?

Any help to answer this question is well received.

$\endgroup$
  • $\begingroup$ the question is whether $[9,12]$ is the product of $[3,0]$ by any scalar. In this case, it is not, since if $[9,12]=\lambda[3,0]$ then on one hand $9=\lambda3$ so $\lambda=9/3=3$ but on the other hand $12\not=\lambda0$. As a different example, if $v=[1,-2]$ then np.dot$(A,v)=[3,-6]=3v$, so $v$ is an eigenvector $\endgroup$ – Mirko Aug 13 at 21:59
5
$\begingroup$

$\begin{bmatrix} a \\ b \end{bmatrix}$ is a scalar multiple of $\begin{bmatrix} c \\ d \end{bmatrix}$ iff $\frac{d}{b} = \frac{c}{a}$ with the special requirement that $b=0$ should imply $d=0$, and similarly for $a$ and $c$.

$\endgroup$
  • $\begingroup$ And what is the answer if any of the values is 0? $\endgroup$ – Hermes Morales Aug 14 at 10:29
  • $\begingroup$ @HermesMorales I wrote about it, as the special requirement. $\endgroup$ – Henno Brandsma Aug 14 at 15:45
  • $\begingroup$ In this case I have the "special requirement" is respected. The "vector_to_study" is [0,2] and the product of the matrix (A) times the "vector_to_study" is [[0,4]. So a and c are 0, and the ratio does not exist. I don't know how to interpret the "special requirement", it confirms or deny that the vectors are collinear?I think that they are because they are on one axis. $\endgroup$ – Hermes Morales Aug 14 at 19:55
  • $\begingroup$ @HermesMorales It fits with what I said: the $0$ in $[0,4]$ is matched by a $0$ in $[0,2]$, the other pair we needn't check as there is no $0$ among them. If we had $3$-vectors we'd have to consider the 2 other coordinates, but here only one coordinate-pair is left and its quotient is $\frac{4}{2}=2$, the eigenvalue. $\endgroup$ – Henno Brandsma Aug 14 at 19:58
3
$\begingroup$

For nonzero vectors $\mathbf{x}$ and $\mathbf{y}$, they are scalar multiples of each other if and only if $$ (\mathbf{x}\cdot\mathbf{y})^2 = (\mathbf{x}\cdot\mathbf{x})(\mathbf{y}\cdot\mathbf{y}), $$ which should be easy to implement in python.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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