0
0
NumPydata~5 mins

np.linalg.eig() for eigenvalues in NumPy - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the function np.linalg.eig() compute?
It computes the eigenvalues and eigenvectors of a square matrix. Eigenvalues tell us how much the matrix stretches or shrinks vectors, and eigenvectors show the directions that stay the same after the matrix transformation.
Click to reveal answer
beginner
What are eigenvalues in simple terms?
Eigenvalues are numbers that tell us how much a matrix stretches or shrinks a vector when it is multiplied by that matrix. They help us understand the matrix's behavior.
Click to reveal answer
beginner
What shape must the input matrix have for np.linalg.eig() to work?
The input must be a square matrix, meaning it has the same number of rows and columns.
Click to reveal answer
intermediate
What does the output of np.linalg.eig() look like?
It returns two arrays: one with eigenvalues and one with eigenvectors. The eigenvectors are columns in the second array, each matching the eigenvalue at the same position.
Click to reveal answer
beginner
How can eigenvalues and eigenvectors be useful in real life?
They help in many areas like data science for reducing data size (PCA), physics for understanding vibrations, and computer graphics for transformations.
Click to reveal answer
What type of matrix can you use with np.linalg.eig()?
ASquare matrix
BRectangular matrix
COnly diagonal matrix
DOnly identity matrix
What does the first output of np.linalg.eig() represent?
AInverse matrix
BEigenvectors
CEigenvalues
DDeterminant
In the output of np.linalg.eig(), how are eigenvectors arranged?
AEigenvectors are not returned
BEach eigenvector is a column in the second output array
CEigenvectors are scalars in the first output
DEach eigenvector is a row in the first output array
Which of these is a practical use of eigenvalues and eigenvectors?
ASorting numbers
BCounting unique values
CCalculating averages
DData compression and feature reduction
If a matrix has an eigenvalue of zero, what does it mean?
AThe matrix is singular (not invertible)
BThe matrix is identity
CThe matrix is diagonal
DThe matrix is symmetric
Explain what np.linalg.eig() does and describe its inputs and outputs.
Think about what eigenvalues and eigenvectors mean and how they relate to the input matrix.
You got /4 concepts.
    Describe a real-world example where eigenvalues and eigenvectors might be useful.
    Consider areas where understanding directions and magnitudes of change is important.
    You got /4 concepts.