Understanding Matrix Equations
Matrix equations often involve systems of linear equations that can be expressed in matrix form. For example, a system of equations can be represented as A*X = B, where A is the matrix of coefficients, X is the vector of variables, and B is the vector of constants [1:2]. Understanding how to manipulate matrices and perform operations like row reduction is crucial for solving these equations
[1:1].
Row Reduction Techniques
One common method for solving matrix equations is using row reduction techniques, such as Gaussian elimination or Gauss-Jordan elimination. These methods involve performing row operations to simplify the augmented matrix and solve for the unknowns [3:1]. It's important to be familiar with these techniques and practice them to become proficient
[1].
Sylvester Equation
In some cases, matrix equations can take the form of a Sylvester equation, which is a specific type of matrix equation AX = XB. Solving this requires specialized techniques and understanding of matrix algebra [2:3]. Direct rearrangement to isolate X on one side is not possible; instead, exploring mathematical properties and solutions specific to Sylvester equations is necessary
[2:2].
Handling Large Systems
For large systems of equations, especially when using software like MATLAB, it's often more efficient to work directly with matrices rather than attempting to solve manually. MATLAB is optimized for matrix operations, and using built-in functions can save time and reduce errors [4:2]
[4:5]. Functions like
vpasolve()
or utilizing symbolic toolboxes can help automate the process [4:6].
Unique vs. Multiple Solutions
When solving matrix equations, it's essential to determine whether the system has unique solutions or multiple solutions. This depends on the number of equations relative to the number of unknowns [5:4]. If there are fewer equations than unknowns, the system may have infinitely many solutions, and additional constraints or assumptions might be needed to find a specific solution
[5:5].
By understanding these concepts and techniques, you can approach matrix equations with confidence and find solutions effectively.
Hi mathletes!
I'm really having a hard time understanding how to get the answers to this question.
I can create the augmented matrix but I'm really stuck/bad at simplifying and performing row operations. I seem to choose the wrong method and this get the wrong answer(s)
Do you have any tips or suggestions??
Thank you so much in advance!
There's a "simple" solution but it's a bit annoying to use. A system of equation can be expressed in Matrix form (A*X=B where X is the vertical vector (1×3 here) of the variables x, y and z, A is the coefficients of x, y and z and B is everything not attached to a variable). According to Crammer, such a matrix equation has a solution if and only if the determinant of A is different of zero.
This gives us a polynomial dependent on k with roots -1 and 0. To know which one leads to impossible solutions and which one gives us a multiplicity of solutions is a bit tricky but the way I'd go about it would be to plug the values in the system and see what happens. If you plug 0 in, you'll see that equation 1 becomes the negation of equation 3 (-x + 3y +2z = 0 and x -3y -2z = 0) which means that it's redundant information and thus does not bring anything to the table. This gives us our multiplicity of solutions.
If you plug -1 in, looking at the same equations you'll notice their results are not coherent. You get -x + 3y +2z = -1 and x - 3y - 2z = 0 which is of course impossible. This gives us the answer to the first question.
The answer to the second one is literally everything else.
Another way of doing it is to do it intuitively and use the way the questions are written to your avantage. Thanks to 1 and 3 you know there's only 1 impossible value and 1 undetermined value while the rest gives you a unique solution. So try to find that.
Again, playing with equations 1 and 3 gives you the value of z(k) from which you can determine that -1 is an impossible value (leads to a division by 0). It's the simplest way to get a variable so it's not an unreasonable assumption that someone would go for that one first when solving. Additionally, intuitively, you'll see that 1 and 3 are identical aside from the presence of the addends in k. If they are set to 0, the equations are identical and 3 becomes redundant, leading to an infinity of solutions.
These two give you the answer to the second question which is everything that's not -1 and 0.
But the "proper" way to do it is to use Cramer and show that the determinant is different from 0 in all cases save -1 and 0.
sorry for the late reply, but thank you so much for your detailed answer! That's really helped me understand the concepts a lot better!
Can you show your work? I would do the row reduction with the augmented matrix. At some point, you would divide by 2k+2, so there is a special case when k = -1. At another point, you would divide by k(k+1) so there is another special case when k =0.
My linear algebra is very rusty, and I've hit a wall working on a recreational math problem.
Given an m×m matrix A and an n×n matrix B with known elements, and an m×n matrix X with unknown elements, is there a good way to solve the equation AX = XB?
It's a system of m*n equations with m*n unknowns, so there should be a solution for each unknown x_ij in terms of the elements of A and B. But can that equation be manipulated to put X on only one side and A and B on the other?
it is not possible to solve directly by rearranging into the form X = something in terms of A and B.
This is a type of Sylvester equation. Check out https://en.wikipedia.org/wiki/Sylvester_equation?wprov=sfti1#
I could be wrong here, but I’m like 75% sure that the only solution is the n × m zero matrix if no further information about A and B are given
Do you understand how to view T as a matrix? Parts a and b are just calculating the matrix products TS and ST and c is a system of 3 linear equations in 3 variables, the general solution is finding the inverse of T (there is an arguably easier one available in this case though).
No inverse operators are needed for this question. Can you be specific with what you are stuck at?
What about c)?
In case the solution is unique, "Gauss-Jordan" is equivalent to finding T^(-1)...
Agreed, but you don’t really need knowledge of inverse or calculate the inverse matrix to solve it. That’s why I say it’s not required. But I do agree gauss Jordan is the same method, just with a different modified matrix.
Let "r := [x; y; z]^T ". If "MS; MT" are the matrices of "S; T" in canonical base:
A(r) = (T o S)(r) = T(S(r)) = MT . (MS . r) = (MT . MS) . r
B(r) = (S o T)(r) = S(T(r)) = MS . (MT . r) = (MS . MT) . r
For c), you need to solve "[8; 9; 5]^T = T(r) = MT . r" -- can you take it from here?
>I’ve followed all the steps I know
Okay, can you share with us what exactly you have done?
>but I'm stuck now, cant find a solution.
What exactly are you stuck on?
I have a linear system of 21 equations and variables in MATLAB but I don't want to write a coefficient matrix to solve it since it's very large. Is it possible to solve the system with just the equations as input ?
If you rewrite the equations you'll have as much work if not more. Matlab is very optimized to work with matrices and using it as such is probably the best way to go.
i assume you talk about z system of linear equations. Why are you reluctant to use something that should work? What would be the benefits of solving this 'manually' when a matrix form allows to handle zlmost any number of equations seamlessly?
Can your describe your problem better?
My system is something like this
c0=0
c1=-.5
c0+c1+c2+....c21=0 ..... ....
(157688/3447)c11+ c18+ (12442/478)c15+.....c1=48
Basically I got these equations from integration in MATLAB and now I need to solve them. The system and coefficients are huge and not arranged in order. So now have to manually create the matrix and arrange them. If I can Extract all these coefficients and constants directly from these I can get the solution from matrix.
vpasolve() may halp you.
https://www.mathworks.com/help/symbolic/sym.vpasolve.html#bt51etx-1_2
So do you use symbolic toolbox? If yess just use 'coeffs' to get the coefficients, it should be straightforward
In the time it took to post to reddit, wait for & reply to responses, implement/test/debug proposed solutions, you could have typed up a 21x21 matrix and solved it directly. I just don’t get these kinds of questions.
I already did. It's not about the question it's about finding a better and easier way to do things which you completely missed.
7 times the first equation minus the third equation equals the second equation. So, the only equation left would be r+s-2t=5, which has many possible solutions.
You mean it equals 17 times the second equation.
Also, you are left with two linearly independent equations, not one.
But, even then, just by seeing in both cases that there are fewer equations than unknown variables already tells you that there are no unique solutions.
No, 7 times the first minus the third eliminates u, then dividing by the common factor equals the second. I thought I made it clear. And I understand what you are saying, I was just showing that OP's system of equations reduces to one that has many solutions, not just that it can't be solved for unique solutions.
To solve for N unknowns, you need N equations.
In the first case, you have 3 equations for 4 unknowns. In the second, 3 equations for 5 unknowns.
You either need more equations or you need to decide that some of your variables are not to be considered unknowns. For example, in the first case, you could assume u is a known constant and then solve for r,s,t in terms of u.
u/jacklope_hunter69 u/KilonumSpoof u/Alkalannar u/grebdlogr u/Party_Limit_3432 thank you for your input, now I get that there isn't a single possible solution
u=r-4
t=r/2+s/2-5/2
[2 3 -6 1 | 11]
[1 1 -2 0 | 5]
[-3 4 -7 7 | -8]
[1 1 -2 0 | 5]
[0 1 -4 1 | 1]
[0 7 -13 7 | 7]
[1 0 2 -1 | 4]
[0 1 -4 1 | 1]
[0 0 15 0 | 0]
[1 0 0 -1 | 4]
[0 1 0 1 | 1]
[0 0 1 0 | 0]
r = u + 4
s = -u + 1
t = 0
u can be anything.
##Off-topic Comments Section
All top-level comments have to be an answer or follow-up question to the post. All sidetracks should be directed to this comment thread as per Rule 9.
^(OP and Valued/Notable Contributors can close this post by using /lock
command)
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
/lock
Done! This thread is now locked. :)
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Answer: Let's call the first matrix M, let's also set v=[x y]^(T) and a=[16 5]^(T)
We know that Mv=a, so M^(-1)Mv=v=M^(-1)a
I’ve been trying to solve this Matrices problem but I’m not sure, it just doesn’t click. I keep solving and solving but the zeros keep jumping around and I never get to an answer. It feels like this goes on for infinity but I have to know how to solve it, any tips or help getting the answer ?
Transform columns into REF from left to right:
--> 1 -3 2 | -22 -> 1 -3 2 | -22
I' = II 0 1 9 | 18 III' = III/3 + 5*II 0 1 9 | 18
II' = I - 2*II 0 -15 6 | -129 0 0 47 | 47
III' = III + 4*II
The last row yields "47z = 47", i.e. "z = 1". Insert successively into the rows above:
y = 18 - 9z = 9, x = -22 + 3y - 2z = 3
Rem.: Take a look at general Gauss-Jordan again -- we want to generate zeroes column-wise from left to right below the main diagonal. No haphazardly throughout the matrix^^
Thank you I will check it again
It's easier to understand when you leave upper row untouched, because you need to get identity matrix, so your left upper number must not be 0.
Or rearrange your rows in that way, so after first eleimination you get
-4 -3 -2 | -41
1 - 3 2 | -22
0 -13 24 | -93
Algorithm asks you to subtract first row multiplied for some constant from second and third rows such that first elements in them become zeroes:
So we multiply it by 2 and and add to last row, then (for integer calculations) multiply second row by 2 and subtract first row from it
Now you need to do the same for second row (for example, from here you may multiply second row by 5 and subtract it from first row or multiply it by 14 and subtract it from third row)
I got stuck here for some reason, it’s weird, i can’t solve all other sorts of math problems but this is the 1st time I’m really stuck on something this semester
Add 13 times third row to first row, first row becomes (0, 0, 141, 141)
Then rearrange rows to get upper-triangle form and do reverse move to get the identity matrix
Okay I think I get what you mean, I’ll retry it
Thanks
Okay, I think I get it. For your first step you added the third row to twice the first - but then you replaced the first with that sum. Because it was the first row, and not the third, that you doubled, the sum should be used to replace the third row, and not the first. Remember: Always replace a row with itself, plus a multiple of another row.
Meanwhile, DON'T scale the second row, as it already starts with a 1, which is what you want. Ultimately, your goal is that each row start with any number of zeroes (or none at all), followed by a 1. (It might help to swap the second row with the first, which is the preferred form.)
Any more questions, please ask.
I think I get what you mean, I had re did it again but somehow I keep getting stuck , it’s intresting since I got to a point where it looks like I’m almost completing it but then I just blank out
Well, did you do what I said to? If you made any progress, you should put it in your Reply, so I can see it. It should conform to what I'm talking about, including a first column of a 1 and two 0s. If the 1 isn't first, swap the rows so that it is. Remember, the row beginning with a 1 should remain untouched for the remainder of your process. You got this.
I have a mathematical system of linear equations.
The coefficients for x, y and z would be (four equations)
-1 0.5 0.5
0.5 -0.5 0.5
0.5 0 -1
1 1 1
first three equations should be equal to 0, last one equal to 1. The solver does not seem to be able to solve these kind of things as it requires one target cell which doesn't make sense here. Or I don't get it.
How can I solve these equations to find x, y and z? (The result should be (1/3, 1/2, 1/6).
UPDATE: I tried using MINVERSE as shown in one answer, but this matrix is not invertible (even if using only the first three equations).
UPDATE 2: I managed to use the solver the right way. See my answer below.
Here's the solution which I found using Deepseek (unfortunately all formatting is gone):
-----------------------
In LibreOffice Calc, you can solve a system of 4 equations with 3 variables using the Solver add-in. Here’s how to set it up step by step:
Step 1: Define Variables and Equations
Assume your system looks like this (modify as needed):
a1x+b1y+c1z=0
a2x+b2y+c2z=0
a3x+b3y+c3z=0
a4x+b4y+c4z=1
Assign cells for variables:
Let x be in A1, y in B1, z in C1 (initially empty or guessed values).
Enter the equations in cells: (Replace a1, b1, c1, ... with actual coefficients from your equations.)
Equation 1: =a1*A1 + b1*B1 + c1*C1 → Store in D1
Equation 2: =a2*A1 + b2*B1 + c2*C1 → Store in D2
Equation 3: =a3*A1 + b3*B1 + c3*C1 → Store in D3
Equation 4: =a4*A1 + b4*B1 + c4*C1 → Store in D4
Step 2: Enable and Configure Solver
Go to Tools → Solver (ensure the Solver add-in is enabled in Tools → Add-ons).
Set up Solver parameters:
Target Cell: D4 (the equation that must equal 1).
Equal To: Value of → 1.
By Changing Cells: $A$1:$C$1 (variables x, y, z).
Add Constraints:
Click Add and set:
D1 = 0
D2 = 0
D3 = 0
(This ensures the first three equations hold.)
Choose Solving Method:
For linear systems, select "Evolutionary" or "DEPS" (nonlinear solver, but works for linear cases).
Click Solve → The Solver will adjust A1, B1, C1 to satisfy all equations.
Your numbers doesn't make sense for me. I sligtly modified it to work.
a) calculate the inverse matrix of the coefficents
b) matrix multiplication with the constant vector gives you the solution to your linear equations
modified coefficent matrix --> inverse matrix with =MINVERSE($A$2:$C$4)
-1 | 0.5 | 0.5 | -2 | -2 | 0 | |
---|---|---|---|---|---|---|
0.5 | -0.5 | -0.5 | -1 | -3 | 1 | |
0.5 | 0 | -1 | -1 | -1 | -1 |
The inverse matrix multiplied with the constant vector gives you the solution =MMULT($F$2:$H$4;D$2:D$4)
-2 | -2 | 0 | 1 | -4 | ||
---|---|---|---|---|---|---|
-1 | -3 | 1 | 1 | -3 | ||
-1 | -1 | -1 | 1 | -3 |
My numbers are correct. The result should be 1/3, 1/2, 1/6.
I tried MINVERSE, too, but the matrix is not invertible.
Just as an extension:
If you have 3 variables and 4 equations, the system is over determined.
Furthermore the first 3 equations of your system are linear dependend:
the 3. equation is the sum of the first 2 multiplied by -1.
if you create a 3x3 matrix of equation No. 1, 2 and 4 you can calculate the inverse and get your results (1/3 1/2 and 1/6)
If you're asking for help with LibreOffice, please make sure your post includes lots of information that could be relevant, such as:
(You can edit your post or put it in a comment.)
This information helps others to help you.
Thank you :-)
Important: If your post doesn't have enough info, it will eventually be removed (to stop this subreddit from filling with posts that can't be answered).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Could you please help me solve this quadratic matrix equation? I look around, seems like there is no general solution for it.. $-BX^2 + X - C = 0$ where X, B and C are (3x3) matrices. B and C are matrices of constant, solve for X.
I found a way to solve it numerically. Thanks everyone
I'm a beginner competitive coder,, and I'm finding myself stuck on questions that have "i+j" stuff, and questions with matrix,, how and from where can I learn to tackle these questions? If it's YouTube,, then what exactly should I search for?
Matrix is math. Find articles about it.
Youtube have some vids too.
Perhaps class in linear algebra
Let say you want to implement A = I + J. Start with 1 dimention, you first task will be figure out:
For each index i, what will A[i] be? This is simple because A[i] = I[i] + J[i]. Then you just do a loop then you solved 1 dimention. Now you need do the same for 2 dimentions. And other operations.
For each one, your goal is simple, find out the equation of A[i][j] = ??? (A mathmatic expression using matrix I and J)
How to solve matrix equations
Key Considerations for Solving Matrix Equations
Matrix Representation: Ensure that your equations are properly represented in matrix form. A typical matrix equation looks like ( AX = B ), where ( A ) is the coefficient matrix, ( X ) is the variable matrix, and ( B ) is the constant matrix.
Matrix Dimensions: Check that the dimensions of the matrices are compatible. For ( AX = B ), if ( A ) is an ( m \times n ) matrix, ( X ) must be an ( n \times p ) matrix, and ( B ) must be an ( m \times p ) matrix.
Methods of Solution:
Special Cases:
Recommendation: Start with the inverse method if ( A ) is square and invertible. For larger systems or when ( A ) is not invertible, consider using row reduction or numerical methods like LU decomposition. Always verify your solution by substituting back into the original equations.
Get more comprehensive results summarized by our most cutting edge AI model. Plus deep Youtube search.