Bird
0
0

What will be the output shape of the solution vector when solving a sparse linear system Ax = b where A is a 1000x1000 sparse matrix and b is a vector of length 1000?

medium📝 Predict Output Q13 of 15
SciPy - Sparse Linear Algebra
What will be the output shape of the solution vector when solving a sparse linear system Ax = b where A is a 1000x1000 sparse matrix and b is a vector of length 1000?
A(1000,)
B(1, 1000)
C(1000, 1000)
D(1000, 1)
Step-by-Step Solution
Solution:
  1. Step 1: Understand dimensions of inputs

    Matrix A is 1000x1000, vector b has length 1000 (shape (1000,)).
  2. Step 2: Result shape of solving Ax = b

    Solution vector x must have shape (1000,) to satisfy multiplication.
  3. Final Answer:

    (1000,) -> Option A
  4. Quick Check:

    Solution vector shape matches b length [OK]
Quick Trick: Solution vector matches b's length, shape (n,) [OK]
Common Mistakes:
  • Confusing vector shape with matrix shape
  • Assuming solution is 2D array
  • Mixing row and column vector shapes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes