# Solving a System of Equations via the Matrix Method

• EEristavi
In summary: Attempt of solution:I create Matrix A with coefficients; Matrix B - Solutions (Zeros) and Matrix X - variables.When I try to use Cramer's rule - because of the Matrix B, I have determinant - 0.Same Situation, if I try to inverse Matrix A and multiply with B.Any help?Matrix B does not have 0's, but the constants (with proper sign). Then use Cramer's rule.
EEristavi
Moved from a technical forum, so homework template missing
I have equation system:

x + y + z - a*k = 0
-b*x + y + z = 0
-c*y + z = 0
-d*x + y = 0

where: a, b, c, d = const.

Have to find: x, y, z, k

Attempt of solution:
I create Matrix A with coefficients; Matrix B - Solutions (Zeros) and Matrix X - variables.

When I try to use Cramer's rule - because of the Matrix B, I have determinant - 0.
Same Situation, if I try to inverse Matrix A and multiply with B.

Any help?

Bring all constants to the R.H.S. of the equation for each of the given equations. Then Matrix B shall not have 0's, but the constants (with proper sign). Then use Cramer's rule.

However, as you see I don't have any free constant.
Maybe I don't understand fully what you mean, can you clarify?

EEristavi said:
However, as you see I don't have any free constant.
Maybe I don't understand fully what you mean, can you clarify?
My mistake, I took ##k## to be a constant.

Matrix ##A## does have an inverse, and Matlab returned the inverse when I tried. But if I do ##A^{-1} B##, then I am getting 0's in all places, as ##B## is a null matrix.

Even if you solve without using Cramer's rule, all answers are 0.

There seems to be a problem with the question. Have you copied correctly?

Last edited:
Wrichik Basu said:
There seems to be a problem with the question. Have you copied correctly?

Yes, This is the problem.

Actually it's not from the Algebra textbook - as an exercise;
these are the actual formulas from chemistry (Above equations were simplified):
A = k / (2.8 x + 1.2 y + 0.7 z)
B = x / ( y + z)
C = y / z
D = x / y

A, B, C, and D are the parameters which I take (as I wish) - and variables are the ratios I wish to get.

If this is chemistry not maths then you are not tied to executing some particular method, but just use what is most convenient and expeditious.
Starting with the last three equations you can very easily eliminate variables in an obvious way to get an equation involving only y and constants. I easily got that either y = 0 all there is a certain relation between B, C and D. (Which largely corresponds to other conclusions above).
Unless the latter relation embodies some stoichiometry or something, it does not sound very chemical.

EEristavi
The only solution to your original problem is the trivial case X=0. This can be easily shown by conventional methods.
For example:
subtract -bx + y + z = 0 from x + y + z - ak = 0 to yield (1 + b) x - ak = 0 => k = x (b + 1) / a
etc...

EEristavi said:
Yes, This is the problem.

Actually it's not from the Algebra textbook - as an exercise;
these are the actual formulas from chemistry (Above equations were simplified):
A = k / (2.8 x + 1.2 y + 0.7 z)
B = x / ( y + z)
C = y / z
D = x / y

A, B, C, and D are the parameters which I take (as I wish) - and variables are the ratios I wish to get.

It looks like in the 2nd 3rd and 4th equations in the OP, you had ## b=\dfrac{1}{B}\,,\ c=\dfrac{1}{C}\,, \text{ and } d=\dfrac{1}{D} \ ## for B, C, and D above. The 1st equation of the OP does not agree with the above equation for A.

However, you have a bigger problem than that. B, C, and D are related. You can't choose them them independently.

D = x / y → ##\ y = \dfrac{1}{D}x ##

C = y / z → ##\ z = \dfrac{1}{C}y \ ## → ##\ z = \dfrac{1}{C} \cdot \dfrac{1}{D}x ##

B = x / ( y + z) → ##\ y+z = \dfrac{1}{B}x \ ## → ##\ \dfrac{1}{D}x+\dfrac{1}{C} \cdot \dfrac{1}{D}x = \dfrac{1}{B}x \ ##

What this gives is that ## \ \dfrac{1}{D}+\dfrac{1}{C} \cdot \dfrac{1}{D} = \dfrac{1}{B} \ .##

In terms of the parameters in the OP: ##\ d + cd = b \ . ##

I'm quite sure that this substitution will give a determinant of zero, but that's a good thing. This is a homogeneous system of equations. As such it has at least one solution. As @Ray Vickson points out, that solution is all zeros. Fortunately, it appears that this system has infinitely many solutions. I have not worked it out, but I expect that you can choose a value for any of the variables, x, y, or z, and then vales for the others will be determined.

Last edited:
EEristavi
EEristavi said:
I have equation system:

x + y + z - a*k = 0
-b*x + y + z = 0
-c*y + z = 0
-d*x + y = 0

where: a, b, c, d = const.

Have to find: x, y, z, k

Attempt of solution:
I create Matrix A with coefficients; Matrix B - Solutions (Zeros) and Matrix X - variables.

When I try to use Cramer's rule - because of the Matrix B, I have determinant - 0.
Same Situation, if I try to inverse Matrix A and multiply with B.

Any help?

If $$\bf{A} = \begin{bmatrix} 1&1&1&-a\\ -b&1&1&0\\ 0 & -c & 1 & 0 \\ -d&1&0&0 \end{bmatrix}, \; \bf{0} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \end{bmatrix} \; \rm{and} \; \bf{X} = \begin{bmatrix} x \\y\\z\\k \end{bmatrix}$$ then your equations have the form ##\bf{A X} = \bf{0}.## There is a fundamental theorem that says:

Theorem: A system of equations of the form ##\bf{A u} = \bf{0}## (with an ##n \times n## matrix ##\bf{A}## and ##n##-dimensional column vectors ##\bf{u}, \bf{0}##) has the unique solution ##\bf{u} = \bf{0}## if and only if the matrix ##\bf{A}## is invertible (that is, has an inverse).

In other words, in your case ##x=y=z=k=0## is the only solution if ##\bf{A}## has an inverse (that is, has a nonzero determinant). If ##\bf{A}## does not have an inverse (that is, has a determinant equal to zero) then there are (infinitely many) non-zero solutions; those would be solutions in which not all of the variables vanish (although some still might). Whether or not the matrix has an inverse depends on the values of ##a,b,c,d##.

EEristavi and DaveE
Thank You all for such a great help and effort.

This is why I love this society

## 1. What is the matrix method for solving a system of equations?

The matrix method is a mathematical technique used to solve a system of equations by representing the equations in matrix form and using matrix operations to find the solution.

## 2. How do you set up the matrix for a system of equations?

To set up the matrix, you write the coefficients of the variables in the equations in a rectangular array, with each row representing an equation and each column representing a variable. The constant terms are written in a separate column on the right side.

## 3. What are the steps for solving a system of equations using the matrix method?

The steps for solving a system of equations using the matrix method are:
1. Write the equations in matrix form
2. Use row operations to simplify the matrix
3. Use back substitution to find the values of the variables
4. Check the solution by substituting the values into the original equations.

## 4. Can the matrix method be used for any type of system of equations?

Yes, the matrix method can be used for any type of system of equations, including systems with two or more variables and equations with fractions or decimals.

## 5. What are the advantages of using the matrix method to solve a system of equations?

The matrix method allows for a systematic and efficient approach to solving systems of equations. It also provides a visual representation of the equations and allows for easy manipulation of the equations through row operations. Additionally, it can be used to solve larger systems of equations that would be difficult to solve by hand.

• Precalculus Mathematics Homework Help
Replies
25
Views
1K
• Precalculus Mathematics Homework Help
Replies
1
Views
824
• Precalculus Mathematics Homework Help
Replies
57
Views
3K
• Precalculus Mathematics Homework Help
Replies
32
Views
944
• Precalculus Mathematics Homework Help
Replies
17
Views
1K
• Precalculus Mathematics Homework Help
Replies
7
Views
518
• Precalculus Mathematics Homework Help
Replies
7
Views
2K
• Precalculus Mathematics Homework Help
Replies
6
Views
1K
• Precalculus Mathematics Homework Help
Replies
14
Views
414
• Precalculus Mathematics Homework Help
Replies
10
Views
2K