Loading

Quipoin Menu

Learn • Practice • Grow

python-for-ai / Linear Algebra with NumPy
mcq
Direction: Choose the correct option

Q1.

Which NumPy function computes the dot product of two vectors?
A. a @ b
B. All of the above
C. np.matmul
D. np.dot
Direction: Choose the correct option

Q2.

How do you compute the inverse of a matrix `A` in NumPy?
A. np.inv(A)
B. np.linalg.inverse(A)
C. A.inv()
D. np.linalg.inv(A)
Direction: Choose the correct option

Q3.

What function computes the determinant of a matrix?
A. np.linalg.det(A)
B. np.linalg.determinant(A)
C. np.det(A)
D. A.det()
Direction: Choose the correct option

Q4.

How do you solve a linear system Ax = b in NumPy?
A. np.solve(A, b)
B. np.linalg.lstsq(A, b)
C. A.solve(b)
D. np.linalg.solve(A, b)
Direction: Choose the correct option

Q5.

What does `np.linalg.eig(A)` return?
A. Singular values
B. Determinant
C. Inverse
D. Eigenvalues and eigenvectors
Direction: Choose the correct option

Q6.

Which function computes the singular value decomposition (SVD)?
A. np.linalg.svd
B. np.linalg.svd
C. np.svd
D. np.linalg.svd
Direction: Choose the correct option

Q7.

What is the result of `np.linalg.matrix_rank(A)`?
A. Trace
B. Norm
C. Determinant
D. Number of linearly independent rows/columns
Direction: Choose the correct option

Q8.

How do you compute the trace of a square matrix?
A. A.trace()
B. np.trace(A)
C. Both A and B
D. np.diag(A).sum()
Direction: Choose the correct option

Q9.

Which function computes the outer product of two vectors?
A. np.inner
B. np.dot
C. np.cross
D. np.outer
Direction: Choose the correct option

Q10.

What does `np.linalg.norm(v)` compute?
A. Max norm
B. Dot product
C. Manhattan norm (L1)
D. Euclidean norm (L2)