Solving system of equations Mathematica

Click For Summary
SUMMARY

The discussion focuses on solving a system of equations represented in matrix form using Mathematica. The user attempts to utilize the LinearSolve[] function but only retrieves a particular solution, specifically the vector (9, 4, 0). The user seeks a method to include the kernel's basis in the output, which would typically involve a general solution format. The conversation suggests that the determinant of the matrix is zero, indicating a lack of unique solutions, and raises the possibility of using the NullSpace[] command to find the complete solution.

PREREQUISITES
  • Understanding of linear algebra concepts, specifically systems of equations and matrix representation.
  • Familiarity with Mathematica, particularly the LinearSolve[] and NullSpace[] functions.
  • Knowledge of vector spaces and the significance of kernel and basis in linear transformations.
  • Basic understanding of determinants and their implications on the uniqueness of solutions.
NEXT STEPS
  • Explore the NullSpace[] function in Mathematica to understand how to obtain the kernel of a matrix.
  • Research methods for obtaining general solutions for underdetermined systems in linear algebra.
  • Learn about the implications of a zero determinant on the solution space of a matrix.
  • Investigate the use of RowReduce[] in Mathematica for solving systems of equations and finding solutions in parametric form.
USEFUL FOR

Mathematics students, data scientists, and anyone working with linear algebra in Mathematica who needs to solve systems of equations and understand the implications of their solutions.

Mr Davis 97
Messages
1,461
Reaction score
44
I am solving the following system of equations (in matrix form):

##\begin{pmatrix} 1 & -2 & -1 & 1 \\ 2 & -3 & 1 & 6 \\ 3 & -5 & 0 & 7 \\ 1 & 0 & 5 & 9 \end{pmatrix}##

I want to solve it using Mathematica, but when I use the command LinearSolve[], I only get back ##\begin{pmatrix} 9 \\ 4 \\ 0 \end{pmatrix}##, which is a particular solution. However, I am looking for how to get an output of something like ##\begin{pmatrix} 9 \\ 4 \\ 0 \end{pmatrix} + t_1\begin{pmatrix} -5 \\ -3 \\ 1 \end{pmatrix}##, where the linear combinations of the basis for the kernel is included. Is there a single command that does this? Or would I have to separately the NullSpace[] command?
 
Physics news on Phys.org
Hi Mr Davis:

I know next to nothing about Mathematica, but I would expect it to have a function you could invoke that would invert a matrix for you. Did you look for one to do that?

ADDED
Sorry, I misunderstood your question. Since you got a 3d vector as the solution from a 4d matrix, I am guessing the determinant is zero. I don't understand why the answer would be a 3d vector, so I am at a loss. I would expect, and I am guessing you are looking for, an answer of the form:
V1 + const x V2​
where V1 and V2 are 4d vectors. V1 is a solution to
M x V = V3,​
and V2 is a solution for
M x V = 0.​

I have nothing to suggest about how to approach this using Mathematica.

Regards,
Buzz
 
Last edited:

Similar threads

  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
10
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K