1. Home
  2. Data Science
  3. NumPy
  4. Which NumPy function is used to calculate the eigenvalues…

Added 24 Feb 2024

Which NumPy function is used to calculate the eigenvalues and eigenvectors of a square matrix?

  1. np.linalg.solve()
  2. np.linalg.det()
  3. np.linalg.eig() Correct answer
  4. np.linalg.inv()

Correct answer

C. np.linalg.eig()

13 views

MCQSEXAM

Explanation

np.linalg.eig() returns the eigenvalues and eigenvectors of a square matrix.

np.linalg.solve() solves a linear system, np.linalg.det() gives the determinant and np.linalg.inv() the inverse. For symmetric matrices np.linalg.eigh() is faster and more accurate.

For more solved questions like this one, see Data Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More NumPy MCQs

Practise all NumPy MCQs

Similar MCQs