Experiment 4
Experiment 4
Experiment No. 4
Matrix Solution System
Marcelo O. Santos
Instructor
I. Objective
To be able to solve systems, of linear equations using matrices.
II. Discussion:
Cramer's Rule:
Cramer's Rule is a method for solving systems of linear equations
with two or more variables. It can be used to find the values of the
variables in a system of equations when the system has a unique solution.
The rule states that given a system of equations represented by an n x n
matrix, the solutions for the variables can be found by taking the
determinant of the matrix with the variables and dividing it by the
determinant of the matrix with the constants.
Figure 2
Figure 1
Figure 5
Figure 4
Figure 3
Cramer's Rule:
IV. Observation
In this experiment, we will be comparing two methods for solving
systems of linear equations in MATLAB: Cramer's Rule and the Inverse
Matrix Method. Both methods can be used to find the unique solutions
for a system of equations, but they have different advantages and
disadvantages.
Next, let's take a look at the Inverse Matrix Method. This method
is implemented in MATLAB using the "inv" function, which takes in the
coefficient matrix as the input and returns the inverse matrix. To find
the solutions for the variables, we simply multiply the inverse matrix by
the constant matrix.
One advantage of the Inverse Matrix Method is that it is
computationally efficient. It only requires the calculation of the
inverse matrix once, and then the solutions can be found by a simple
matrix multiplication. However, a disadvantage of this method is that
it can only be used for systems of equations with a non-singular
coefficient matrix. If the matrix is singular, the "inv" function will
return an error and the method cannot be used.
V. Conclusion
In conclusion, both Cramer's Rule and the Inverse Matrix Method
are useful methods for solving systems of linear equations in MATLAB.
Cramer's Rule is relatively easy to understand and implement, but it
can be computationally expensive for large systems of equations. The
Inverse Matrix Method is computationally efficient, but it can only be
used for non-singular systems of equations. Depending on the specific
problem and the computational resources available, one method may
be more suitable than the other. It's worth noting that both methods are
well supported in MATLAB, and with the help of the functions provided
by the software, it's easy to implement these methods with a good level
of precision. In any case, it's recommended to carefully evaluate the
options before deciding which method to use.