Solving 2 × 2 systems of equations, MATLAB in Engineering

Solving 2 × 2 systems of equations:

However this may be easy in a MATLAB, in normal finding solutions to the systems of equations is not. The systems which are 2 × 2 are, though, fairly clear-cut, and there are many methods of solution for such systems for which the MATLAB has built-in functions.

Consider the 2×2 system of equations which is as shown below:

1031_Solving 2 × 2 systems of equations.png

At first, to visualize the solution, it will be simpler to change both the equations to equation of a straight line by writing each in the form y = mx + b (by altering x1 to x and x2 to y):

2130_Solving 2 × 2 systems of equations1.png

In MATLAB we can plot these lines by using a script; the answers are shown in figure.

778_Solving 2 × 2 systems of equations2.png

2016_Solving 2 × 2 systems of equations3.png

The intersection of the lines is the point (4, -1). In another words, x = 4 and y = -1. Altering back to x1 and x2, we hold x1 = 4 and x2 = -1. This permits us to visualize the solution.

This system of equations in a matrix form is as shown below:

1793_Solving 2 × 2 systems of equations4.png

We know that the solution is x = A-1 b, therefore we solve this when we can find the inverse of A. The one technique of finding the inverse for a 2 × 2 matrix includes computing the determinant D.


´ For a 2× 2matrix A=

719_Solving 2 × 2 systems of equations5.png

The determinant D is defined as follows:


1027_Solving 2 × 2 systems of equations6.png

It is written by using vertical lines around the coefficients of the matrix, and is defined as the product of the values on the diagonal minus the product of the other two numbers.

For a 2 × 2 matrix, the matrix inverse is defined in terms of D as shown below:

1377_Solving 2 × 2 systems of equations7.png

Posted Date: 10/22/2012 3:07:57 AM | Location : United States

Related Discussions:- Solving 2 × 2 systems of equations, Assignment Help, Ask Question on Solving 2 × 2 systems of equations, Get Answer, Expert's Help, Solving 2 × 2 systems of equations Discussions

Write discussion on Solving 2 × 2 systems of equations
Your posts are moderated
Related Questions
Illustration of initializing the data structure: illustration of initializing the data structure by preallocating is here as shown: >> cyls(3) = struct('code', 'c', 'dimen

readlenwid function: function call: [length, width] = readlenwid; function header: function [l,w] = readlenwid In the function call, not any argument is passed; henc

Plotting File data: It is frequently essential to read data from a file and plot it. Generally, this entails knowing the format of the file. For illustration, let us suppose t

Replacing a string - function strrep: The function strrep finds all the occurrences of a substring within the string, and substitutes them with a new substring. The order of a

Creating a cell array: The other method of creating a cell array is easy to assign values to particular array elements and build it up element by element. Though, as explained

Function rmfield - structure: The function rmfield eliminates a field from the structure. It returns a new structure with field eliminated, but does not modify the original st

Example to change the line width from the default: For illustration, to change the line width from the default of 0.5 to 1.5: >> set(hl,'LineWidth',1.5) As long as the

Passing Structures to Functions: The whole structure can be passed to a function, or separate fields can be passed. For illustration, here are the two distinct versions of a f

Illustration of Sorting strings: To sort on the rows rather than second dimension should be specified. >> sort(words,2) ans = Hello Hdowy Hi Gbdeo

Example of Gauss-jordan: For a 2×2 system, this would results and for a 3 × 3 system, Note that the resulting diagonal form does not involve the right-most col