how to identify if a vector is an eigenvector of a given matrix

1.1k Views Asked by At

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.

2

There are 2 best solutions below

4
On

$\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$.

0
On

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.