0% found this document useful (0 votes)
20 views

Experiment 4

This document summarizes an engineering lab experiment on solving systems of linear equations using matrices. The objective is to solve systems of linear equations using Cramer's Rule and the Inverse Matrix Method. Cramer's Rule uses determinants to find solutions but is computationally expensive for large systems, while the Inverse Matrix Method uses matrix inversions and is more efficient but only works if the coefficient matrix is non-singular. The lab compares implementing both methods in MATLAB to determine the best approach depending on the specific problem and available resources.

Uploaded by

Caji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Experiment 4

This document summarizes an engineering lab experiment on solving systems of linear equations using matrices. The objective is to solve systems of linear equations using Cramer's Rule and the Inverse Matrix Method. Cramer's Rule uses determinants to find solutions but is computationally expensive for large systems, while the Inverse Matrix Method uses matrix inversions and is more efficient but only works if the coefficient matrix is non-singular. The lab compares implementing both methods in MATLAB to determine the best approach depending on the specific problem and available resources.

Uploaded by

Caji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

College of Engineering

Advanced Mathematics for ECE - Lab

Experiment No. 4
Matrix Solution System

Pangan, Zacarias Lancelot


Cruz, Sean Chris Kirk Patrick
Dalit, Angeline
Cagubcub, Carl Patrick
Bacar, Joshua
Dela Cruz, Jeif Rhey
Grade
Course: BSECE

Date Performed: January 19, 2023


Date Submitted:

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.

Inverse Matrix Method:


The inverse matrix method is a method for solving systems of
linear equations with two or more variables. It involves finding the
inverse of the coefficient matrix and then multiplying it by the constant
matrix to get the solutions for the variables. The inverse matrix is a
special matrix that, when multiplied by the original matrix, results in
the identity matrix. In other words, A^-1 * A = I, where A^-1 is the inverse
matrix of A, A is the coefficient matrix and I is the identity matrix. This
method can be used to find the unique solutions to a system of equations
only if the coefficient matrix is invertible (non-singular).
III. Procedure:
Inverse Matrix Method:

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.

First, let's take a look at Cramer's Rule. This method is


implemented in MATLAB using the "cramer" function, which takes in the
coefficient matrix and the constant matrix as inputs. The function then
calculates the determinant of the coefficient matrix and the
determinant of the matrix formed by replacing each column of the
coefficient matrix with the constant matrix. Finally, it divides the
determinant of the latter matrix by the determinant of the coefficient
matrix to get the solutions for the variables.

One advantage of Cramer's Rule is that it is relatively easy to


understand and implement in MATLAB. It only requires the use of basic
matrix operations, such as determinant calculation and matrix
substitution. However, a disadvantage of this method is that it is
computationally expensive, especially for large systems of equations.

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.

You might also like