Solving Systems of Linear Equations with ljx.m

Click For Summary
SUMMARY

The discussion focuses on using the Matlab function ljx.m to solve a system of linear equations represented by matrix A and vector b. The user queries the choice of pivot element in the function call ljx(T,2,1) versus ljx(T,1,1), seeking clarification on the implications of pivot selection on the dependency of the resulting variables. The results from both function calls yield equivalent solutions for y3, but the user questions the interpretation of variable dependencies based on the outputs.

PREREQUISITES
  • Understanding of linear algebra concepts, specifically systems of linear equations.
  • Familiarity with Matlab programming and function usage.
  • Knowledge of matrix operations and pivoting techniques in Gaussian elimination.
  • Experience with interpreting variable dependencies in linear systems.
NEXT STEPS
  • Explore the Matlab documentation for ljx.m to understand its implementation and options.
  • Study the principles of Gaussian elimination and pivot selection in solving linear equations.
  • Learn about variable dependency and independence in the context of linear algebra.
  • Experiment with different pivot selections in Matlab to observe their effects on solution outcomes.
USEFUL FOR

Matlab users, students of linear algebra, and anyone interested in solving systems of linear equations using computational tools.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! I need some help using the Matlab function ljx.m for solving a system of linear equations. I found a solved example for A= \bigl(\begin{smallmatrix}<br /> 1 &amp; -1 &amp;0 &amp; 1\\ <br /> 1 &amp; 0&amp; 1 &amp; 0\\ <br /> 1 &amp;1 &amp;2 &amp; -1<br /> \end{smallmatrix}\bigr) and b=\bigl(\begin{smallmatrix}<br /> 1\\ <br /> 1\\ <br /> -1<br /> \end{smallmatrix}\bigr).
At the first time they call the function by ljx(T,2,1).
Why do they take as pivot this element, and not for example ljx(T,1,1)??
Is there a specific reason, or can we take as pivot any element we want as long as it's different from 0?
:confused:
 
Last edited by a moderator:
Physics news on Phys.org
When I call the function ljx(T,1,1), then ljx(2,2) I get that the row y_{3} is dependent and can be written as y_{3}=-y_{1}+2y_{2}+1.

When I call the function ljx(T,2,1), then ljx(T,3,2) I get y_{1}=2y_{2}-y_{3}+1.
If I solve for y_{3} I get the same answer as at the first case. But the result y_{1}=2y_{2}-y_{3}+1 doesn't mean that y_{1} is dependent and y_{3} independent?
Are the results at both cases equal??
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 23 ·
Replies
23
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K