Two Equations, Three variables

  • Context: Undergrad 
  • Thread starter Thread starter chlorine addi
  • Start date Start date
  • Tags Tags
    Variables
Click For Summary
SUMMARY

This discussion addresses solving two equations with three variables, specifically in the context of linear algebra. The equations are represented as a = n1*x + n2*y + n3*z and b = m1*x + m2*y + m3*z, where x, y, and z are constrained to be nonnegative and less than 100. The solution geometrically represents two planes in three-dimensional space, which may intersect in a line or not at all. The discussion emphasizes the need to find specific values of z that satisfy the constraints for x and y, and suggests methods for visualizing and determining these values through plotting and intersection analysis.

PREREQUISITES
  • Understanding of linear equations and systems
  • Familiarity with linear algebra concepts, particularly planes and intersections
  • Knowledge of optimization techniques and linear programming
  • Basic skills in data visualization for plotting equations
NEXT STEPS
  • Research methods for solving systems of linear equations using matrix algebra
  • Learn about linear programming techniques for optimization
  • Explore data visualization tools for plotting equations in three dimensions
  • Investigate numerical methods for finding intersections of geometric shapes
USEFUL FOR

Mathematicians, engineers, data scientists, and anyone involved in solving complex systems of equations or optimizing linear models.

chlorine addi
Messages
3
Reaction score
0
I'm working on a project where I have two equations with three variables. I know that the solution will be a line; however I need specific values. Is there a way for me to do this if I know some general parameters for each variable? For example, if a=n1*x+n2*y+n2*z and b=m1*x+m2*y+m3*z, and I know that x, y, and z are all greater than zero or equal to zero, but less than 100, is there a way to solve this?

I can solve this the "manual" way of extracting this data from my program for each set of equations. However, there are literally 100s of systems of equations that I need to solve, so I was wondering if there was a way I could save time :)

Thanks for any help!

Much appreciated,
Kelsey
 
Mathematics news on Phys.org
If you have two equations in three unknowns, what you have geometrically is two planes in three-dimensional space. There are three possibilities: the system has no solutions at all (the planes are parallel and don't intersect); the planes intersect in a line; the planes are coincident (every point on one plane is also on the other).

Knowing that x, y, and z are nonnegative and less than 100 doesn't really help all that much. It means only that solutions are limited to a part of the first octant. I don't know of any shortcuts for finding solutions to your systems.
 
Read the wikipedia entries on the topics optimization and linear programming.

If you know that your solution is a line then you need to find out the exact conditions of the line where the 0\leq x,y,z <100 are all satisfied simultaneously. Assuming you can obtain x(z) and y(z), you can then think about plotting x and y on the same plot vs. z. Now chop off the sides that don't satisfy the constraint equation you have for 0<=z<100. Then cut the lines x and y into line segments where the values of x and y lie between 0 and 100. Examine if there are any portions of the line segments that lie with in the truncated z region on the plot simultaneously.

A different way of saying the same thing as above: Take your x(z), and y(z) regions and find values of z for which x(z) is lesser than 100 and greater than 0. You get two values of z here which indicate the set of values of z for which x satisfies the given constraint. Next repeat the same for y(z), you again get 2 values of z denoting another set of values z can take to satisfy the constrain on y. Now find the intersection of these two sets and the third set $z \in [0,100)$. If the intersection is a null set, well, you don't have any solutions to the system. Otherwise, you should have several values of z to choose from which should satisfy all the equations you are given. The final regions depend on each value of a,b,m_i, n_i that you select out of your 'literally 100s of systems of equations'.

There might be more succinct answers, but this process gives you the basic idea of how the linear algebra solution has to be implemented.

Edit: I am assuming that your 100s of equations come from real measured data. If so, then the method will apply almost surely always. However, if you are using a random number generator that generates whole numbers or are simulating a finite element/finite difference type system, you might want to check, or enforce, that the expression m1*n2 - m2*n1 \neq 0, always. This relates to the linear independence of x and y variables. If that expression is zero, then you can think of constructing another strategy using a similar approach. And note that you can have no solution, single solution or many solutions as Mark44 says. Again, if your system comes from measured data, you will usually have many solutions. How you choose which value to use is completely up to you.
 
Last edited:

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K