Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende 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.

Tarea

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().

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 10
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

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

Desliza para mostrar el menú

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.

Tarea

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().

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

close

Awesome!

Completion rate improved to 1.89
Sección 4. Capítulo 10
single

single

some-alt