0

I was reading how to make use MATLAB to solve a linear equations.

In this chapter, we deal with several numerical schemes for solving a system of equations

a11x1 + a12x2 + ·· ·+a1NxN = b1
a21x1 + a22x2 + ·· ·+a2NxN = b2
. . . . . . . . . = .
aM1x1 + aM2x2 + ·· ·+aMNxN = bM

which can be written in a compact form by using a matrix–vector notation as

A   X = b
 mxn 

where:

       a11 a12 · · a1N
AM×N = a21 a22 · · a2N
        · · · · ·
       M1 aM2 · · aMN

       x1
  x=   x2
       ·
       xN

       b1
  b =  b2
        ·
       bM

In which we have 3 cases : M=N;M<N;M>N

I was not able to understand the below block:

The Nonsingular Case (M = N)

x = A^−1 b

so long as the matrix A is not singular

>>A = [1 2;2 4]; b = [-1;-1];
>>x = A^-1*b
Warning: Matrix is singular to working precision.
x = -Inf
-Inf

This is the case where some or all of the rows of the coefficient matrix A are
dependent on other rows and so the rank of A is deficient, which implies that
there are some equations equivalent to or inconsistent with other equations. If
we remove the dependent rows until all the (remaining) rows are independent of
each other so that A has full rank (equal to M), it leads to the case of M <N,
which will be dealt with in the next section.

What does 'rank of A is deficient' means and implies thereon?

2 Answers 2

2

If rows of matrix are linearly dependant on each other, the determinant of that matrix is always equal to zero. Here in matrix A, the rows are (1 2) and (2 4) which are linearly dependent i.e. a(1 2) + b(2 4) = 0 where a=2 and b=-1. For any nXn non-singular matrix, rank = n. For a singular matrix, linearly dependent rows are removed and then the determinant is calculated. If that is not equal to zero then the rank = n-1. But if it is again equal to zero, linearly dependant row is removed and now the determinant is calculated. In this case the rank = n-2.

This process is continued till the determinant converges to zero

Sign up to request clarification or add additional context in comments.

1 Comment

If you don't understand the comments above which are kind of technical look for an economics book or basic textbook that includes row rank reduce methods. They give you step by step guides on how to do the row rank reducing. Alternatively, try to solve the simultaneous equation that you proposed in your question. You will see that the lines are parallel and hence cannot have a solution since the slope in each line must be equal since one row is the same as the other except multiplied by 2.
1

The error you get means that A can not be inverted. But that does not mean there is no solution. You need not stop now.

If there is a solution it is not unique - you might need to find the subspace it is in.

The keyword is pseudoinverse. In matlab the command pinv. You will get the solution closest to your problem.

eg:

c=pinv(A)*b

it will produce a correct solution (one of many) for A = [1 2;2 4]; b = [-1;-2]; (remember A still is not invertible!) - and for your problem with b=[-1;-1] a close one

1 Comment

Thanks for the reference and details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.