Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Solving a Linear System with LU Decomposition | Linear Algebra Foundations
Mathematics for Data Science

bookChallenge: Solving a Linear System with LU Decomposition

A student is given a small system of linear equations representing the balance of flows in a simple network.

The system is expressed as:

Ax=bA \vec{x} = \vec{b}

Where:

  • AA is a 3×33×3 matrix;
  • b\vec{b} is the vector of known quantities.

The student's goal is to solve for x\vec{x} by performing LU decomposition on matrix AA, then using forward and backward substitution to find the solution.

Compare your solution with numpy's built-in solver to verify correctness.

Opgave

Swipe to start coding

Complete the Python code below to implement LU decomposition and solve the system step-by-step:

  1. Fill in the missing code for the LU factorization of AA.
  2. Implement forward substitution to solve Ly=bL\vec{y} = \vec{b}.
  3. Implement backward substitution to solve Ux=yU\vec{x} = \vec{y}.
  4. Compare your solution with np.linalg.solve().

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 4. Kapitel 10
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Suggested prompts:

Can you show me how to perform LU decomposition step by step?

How do I use forward and backward substitution after LU decomposition?

How can I compare my solution with numpy's built-in solver?

close

Awesome!

Completion rate improved to 1.89

bookChallenge: Solving a Linear System with LU Decomposition

Stryg for at vise menuen

A student is given a small system of linear equations representing the balance of flows in a simple network.

The system is expressed as:

Ax=bA \vec{x} = \vec{b}

Where:

  • AA is a 3×33×3 matrix;
  • b\vec{b} is the vector of known quantities.

The student's goal is to solve for x\vec{x} by performing LU decomposition on matrix AA, then using forward and backward substitution to find the solution.

Compare your solution with numpy's built-in solver to verify correctness.

Opgave

Swipe to start coding

Complete the Python code below to implement LU decomposition and solve the system step-by-step:

  1. Fill in the missing code for the LU factorization of AA.
  2. Implement forward substitution to solve Ly=bL\vec{y} = \vec{b}.
  3. Implement backward substitution to solve Ux=yU\vec{x} = \vec{y}.
  4. Compare your solution with np.linalg.solve().

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

close

Awesome!

Completion rate improved to 1.89
Sektion 4. Kapitel 10
single

single

some-alt