Vous êtes sur la page 1sur 12

This has a computational origin.

When numbers in the matrix


are close to the machine precision (eps), the number of
independent rows from the computers' point of view is less
than the number of independent rows from the mathematical
point of view.
A simple example. Take the following matrix:
A = [1 0.705;
1.41 1];
b = [1;
sqrt(2)];
Basically, we put sqrt(2) in 2 decimals precision in the
matrix. Solving A\b gives
[0.5;
0.708]
However, putting
c = [1;
1.41];
and then A\c gives:
[1;
0]
as solution. So, rounding off can be bad.
Now back to inverting a matrix. Say this is your real matrix:
A = [1 0
0 1e-3];
While this is a matrix with rank(2) (2 independent rows),
the matrix is badly scaled, since the last element is close
to 0. cond(A) gives a condition of 1000.
Now try inv(A) on this for decreasing the last element, e.g.
1e-6, 1e-12, 1e-16, 1e-20. The last element becomes close
and closer to 0, until it becomes indistinguishable from 0.
Then inv(A) starts to complain (or, warn you).
You should read something about rounding off errors when
working with limited precision.
Subject: Warning: Matrix is singular to working precision
From: saneman
Date: 30 May, 2008 10:11:04
Message: 3 of 11
Reply to this message
Add author to My Watch List
View original format
Flag as spam

"Sebastiaan " <s.breedveld@erasmusmc.REMOVE.BOO.BOO.nl> skrev i en


meddelelse news:g1oito$8b0$1@fred.mathworks.com...
> This has a computational origin. When numbers in the matrix
> are close to the machine precision (eps), the number of
> independent rows from the computers' point of view is less
> than the number of independent rows from the mathematical
> point of view.
>
> A simple example. Take the following matrix:
> A = [1 0.705;
> 1.41 1];
> b = [1;
> sqrt(2)];
>
> Basically, we put sqrt(2) in 2 decimals precision in the
> matrix. Solving A\b gives
> [0.5;
> 0.708]
>
> However, putting
> c = [1;
> 1.41];
> and then A\c gives:
> [1;
> 0]
>
> as solution. So, rounding off can be bad.
>
> Now back to inverting a matrix. Say this is your real matrix:
> A = [1 0
> 0 1e-3];
> While this is a matrix with rank(2) (2 independent rows),
> the matrix is badly scaled, since the last ele
This has a computational origin. When numbers in the matrix
are close to the machine precision (eps), the number of
independent rows from the computers' point of view is less
than the number of independent rows from the mathematical
point of view.
A simple example. Take the following matrix:
A = [1 0.705;
1.41 1];
b = [1;
sqrt(2)];
Basically, we put sqrt(2) in 2 decimals precision in the
matrix. Solving A\b gives
[0.5;

0.708]
However, putting
c = [1;
1.41];
and then A\c gives:
[1;
0]
as solution. So, rounding off can be bad.
Now back to inverting a matrix. Say this is your real matrix:
A = [1 0
0 1e-3];
While this is a matrix with rank(2) (2 independent rows),
the matrix is badly scaled, since the last element is close
to 0. cond(A) gives a condition of 1000.
Now try inv(A) on this for decreasing the last element, e.g.
1e-6, 1e-12, 1e-16, 1e-20. The last element becomes close
and closer to 0, until it becomes indistinguishable from 0.
Then inv(A) starts to complain (or, warn you).
You should read something about rounding off errors when
working with limited precision.
Subject: Warning: Matrix is singular to working precision
From: saneman
Date: 30 May, 2008 10:11:04
Message: 3 of 11
Reply to this message
Add author to My Watch List
View original format
Flag as spam

"Sebastiaan " <s.breedveld@erasmusmc.REMOVE.BOO.BOO.nl> skrev i en


meddelelse news:g1oito$8b0$1@fred.mathworks.com...
> This has a computational origin. When numbers in the matrix
> are close to the machine precision (eps), the number of
> independent rows from the computers' point of view is less
> than the number of independent rows from the mathematical
> point of view.
>
> A simple example. Take the following matrix:
> A = [1 0.705;
> 1.41 1];
> b = [1;
> sqrt(2)];
>

> Basically, we put sqrt(2) in 2 decimals precision in the


> matrix. Solving A\b gives
> [0.5;
> 0.708]
>
> However, putting
> c = [1;
> 1.41];
> and then A\c gives:
> [1;
> 0]
>
> as solution. So, rounding off can be bad.
>
> Now back to inverting a matrix. Say this is your real matrix:
> A = [1 0
> 0 1e-3];
> While this is a matrix with rank(2) (2 independent rows),
> the matrix is badly scaled, since the last ele
This has a computational origin. When numbers in the matrix
are close to the machine precision (eps), the number of
independent rows from the computers' point of view is less
than the number of independent rows from the mathematical
point of view.
A simple example. Take the following matrix:
A = [1 0.705;
1.41 1];
b = [1;
sqrt(2)];
Basically, we put sqrt(2) in 2 decimals precision in the
matrix. Solving A\b gives
[0.5;
0.708]
However, putting
c = [1;
1.41];
and then A\c gives:
[1;
0]
as solution. So, rounding off can be bad.
Now back to inverting a matrix. Say this is your real matrix:
A = [1 0
0 1e-3];
While this is a matrix with rank(2) (2 independent rows),

the matrix is badly scaled, since the last element is close


to 0. cond(A) gives a condition of 1000.
Now try inv(A) on this for decreasing the last element, e.g.
1e-6, 1e-12, 1e-16, 1e-20. The last element becomes close
and closer to 0, until it becomes indistinguishable from 0.
Then inv(A) starts to complain (or, warn you).
You should read something about rounding off errors when
working with limited precision.
Subject: Warning: Matrix is singular to working precision
From: saneman
Date: 30 May, 2008 10:11:04
Message: 3 of 11
Reply to this message
Add author to My Watch List
View original format
Flag as spam

"Sebastiaan " <s.breedveld@erasmusmc.REMOVE.BOO.BOO.nl> skrev i en


meddelelse news:g1oito$8b0$1@fred.mathworks.com...
> This has a computational origin. When numbers in the matrix
> are close to the machine precision (eps), the number of
> independent rows from the computers' point of view is less
> than the number of independent rows from the mathematical
> point of view.
>
> A simple example. Take the following matrix:
> A = [1 0.705;
> 1.41 1];
> b = [1;
> sqrt(2)];
>
> Basically, we put sqrt(2) in 2 decimals precision in the
> matrix. Solving A\b gives
> [0.5;
> 0.708]
>
> However, putting
> c = [1;
> 1.41];
> and then A\c gives:
> [1;
> 0]
>
> as solution. So, rounding off can be bad.
>
> Now back to inverting a matrix. Say this is your real matrix:

> A = [1 0
> 0 1e-3];
> While this is a matrix with rank(2) (2 independent rows),
> the matrix is badly scaled, since the last ele
This has a computational origin. When numbers in the matrix
are close to the machine precision (eps), the number of
independent rows from the computers' point of view is less
than the number of independent rows from the mathematical
point of view.
A simple example. Take the following matrix:
A = [1 0.705;
1.41 1];
b = [1;
sqrt(2)];
Basically, we put sqrt(2) in 2 decimals precision in the
matrix. Solving A\b gives
[0.5;
0.708]
However, putting
c = [1;
1.41];
and then A\c gives:
[1;
0]
as solution. So, rounding off can be bad.
Now back to inverting a matrix. Say this is your real matrix:
A = [1 0
0 1e-3];
While this is a matrix with rank(2) (2 independent rows),
the matrix is badly scaled, since the last element is close
to 0. cond(A) gives a condition of 1000.
Now try inv(A) on this for decreasing the last element, e.g.
1e-6, 1e-12, 1e-16, 1e-20. The last element becomes close
and closer to 0, until it becomes indistinguishable from 0.
Then inv(A) starts to complain (or, warn you).
You should read something about rounding off errors when
working with limited precision.
Subject: Warning: Matrix is singular to working precision
From: saneman
Date: 30 May, 2008 10:11:04
Message: 3 of 11

Reply to this message


Add author to My Watch List
View original format
Flag as spam

"Sebastiaan " <s.breedveld@erasmusmc.REMOVE.BOO.BOO.nl> skrev i en


meddelelse news:g1oito$8b0$1@fred.mathworks.com...
> This has a computational origin. When numbers in the matrix
> are close to the machine precision (eps), the number of
> independent rows from the computers' point of view is less
> than the number of independent rows from the mathematical
> point of view.
>
> A simple example. Take the following matrix:
> A = [1 0.705;
> 1.41 1];
> b = [1;
> sqrt(2)];
>
> Basically, we put sqrt(2) in 2 decimals precision in the
> matrix. Solving A\b gives
> [0.5;
> 0.708]
>
> However, putting
> c = [1;
> 1.41];
> and then A\c gives:
> [1;
> 0]
>
> as solution. So, rounding off can be bad.
>
> Now back to inverting a matrix. Say this is your real matrix:
> A = [1 0
> 0 1e-3];
> While this is a matrix with rank(2) (2 independent rows),
> the matrix is badly scaled, since the last ele
This has a computational origin. When numbers in the matrix
are close to the machine precision (eps), the number of
independent rows from the computers' point of view is less
than the number of independent rows from the mathematical
point of view.
A simple example. Take the following matrix:
A = [1 0.705;
1.41 1];
b = [1;

sqrt(2)];
Basically, we put sqrt(2) in 2 decimals precision in the
matrix. Solving A\b gives
[0.5;
0.708]
However, putting
c = [1;
1.41];
and then A\c gives:
[1;
0]
as solution. So, rounding off can be bad.
Now back to inverting a matrix. Say this is your real matrix:
A = [1 0
0 1e-3];
While this is a matrix with rank(2) (2 independent rows),
the matrix is badly scaled, since the last element is close
to 0. cond(A) gives a condition of 1000.
Now try inv(A) on this for decreasing the last element, e.g.
1e-6, 1e-12, 1e-16, 1e-20. The last element becomes close
and closer to 0, until it becomes indistinguishable from 0.
Then inv(A) starts to complain (or, warn you).
You should read something about rounding off errors when
working with limited precision.
Subject: Warning: Matrix is singular to working precision
From: saneman
Date: 30 May, 2008 10:11:04
Message: 3 of 11
Reply to this message
Add author to My Watch List
View original format
Flag as spam

"Sebastiaan " <s.breedveld@erasmusmc.REMOVE.BOO.BOO.nl> skrev i en


meddelelse news:g1oito$8b0$1@fred.mathworks.com...
> This has a computational origin. When numbers in the matrix
> are close to the machine precision (eps), the number of
> independent rows from the computers' point of view is less
> than the number of independent rows from the mathematical
> point of view.
>
> A simple example. Take the following matrix:

> A = [1 0.705;
> 1.41 1];
> b = [1;
> sqrt(2)];
>
> Basically, we put sqrt(2) in 2 decimals precision in the
> matrix. Solving A\b gives
> [0.5;
> 0.708]
>
> However, putting
> c = [1;
> 1.41];
> and then A\c gives:
> [1;
> 0]
>
> as solution. So, rounding off can be bad.
>
> Now back to inverting a matrix. Say this is your real matrix:
> A = [1 0
> 0 1e-3];
> While this is a matrix with rank(2) (2 independent rows),
> the matrix is badly scaled, since the last ele
This has a computational origin. When numbers in the matrix
are close to the machine precision (eps), the number of
independent rows from the computers' point of view is less
than the number of independent rows from the mathematical
point of view.
A simple example. Take the following matrix:
A = [1 0.705;
1.41 1];
b = [1;
sqrt(2)];
Basically, we put sqrt(2) in 2 decimals precision in the
matrix. Solving A\b gives
[0.5;
0.708]
However, putting
c = [1;
1.41];
and then A\c gives:
[1;
0]
as solution. So, rounding off can be bad.

Now back to inverting a matrix. Say this is your real matrix:


A = [1 0
0 1e-3];
While this is a matrix with rank(2) (2 independent rows),
the matrix is badly scaled, since the last element is close
to 0. cond(A) gives a condition of 1000.
Now try inv(A) on this for decreasing the last element, e.g.
1e-6, 1e-12, 1e-16, 1e-20. The last element becomes close
and closer to 0, until it becomes indistinguishable from 0.
Then inv(A) starts to complain (or, warn you).
You should read something about rounding off errors when
working with limited precision.
Subject: Warning: Matrix is singular to working precision
From: saneman
Date: 30 May, 2008 10:11:04
Message: 3 of 11
Reply to this message
Add author to My Watch List
View original format
Flag as spam

"Sebastiaan " <s.breedveld@erasmusmc.REMOVE.BOO.BOO.nl> skrev i en


meddelelse news:g1oito$8b0$1@fred.mathworks.com...
> This has a computational origin. When numbers in the matrix
> are close to the machine precision (eps), the number of
> independent rows from the computers' point of view is less
> than the number of independent rows from the mathematical
> point of view.
>
> A simple example. Take the following matrix:
> A = [1 0.705;
> 1.41 1];
> b = [1;
> sqrt(2)];
>
> Basically, we put sqrt(2) in 2 decimals precision in the
> matrix. Solving A\b gives
> [0.5;
> 0.708]
>
> However, putting
> c = [1;
> 1.41];
> and then A\c gives:
> [1;

> 0]
>
> as solution. So, rounding off can be bad.
>
> Now back to inverting a matrix. Say this is your real matrix:
> A = [1 0
> 0 1e-3];
> While this is a matrix with rank(2) (2 independent rows),
> the matrix is badly scaled, since the last ele
This has a computational origin. When numbers in the matrix
are close to the machine precision (eps), the number of
independent rows from the computers' point of view is less
than the number of independent rows from the mathematical
point of view.
A simple example. Take the following matrix:
A = [1 0.705;
1.41 1];
b = [1;
sqrt(2)];
Basically, we put sqrt(2) in 2 decimals precision in the
matrix. Solving A\b gives
[0.5;
0.708]
However, putting
c = [1;
1.41];
and then A\c gives:
[1;
0]
as solution. So, rounding off can be bad.
Now back to inverting a matrix. Say this is your real matrix:
A = [1 0
0 1e-3];
While this is a matrix with rank(2) (2 independent rows),
the matrix is badly scaled, since the last element is close
to 0. cond(A) gives a condition of 1000.
Now try inv(A) on this for decreasing the last element, e.g.
1e-6, 1e-12, 1e-16, 1e-20. The last element becomes close
and closer to 0, until it becomes indistinguishable from 0.
Then inv(A) starts to complain (or, warn you).
You should read something about rounding off errors when
working with limited precision.

Subject: Warning: Matrix is singular to working precision


From: saneman
Date: 30 May, 2008 10:11:04
Message: 3 of 11
Reply to this message
Add author to My Watch List
View original format
Flag as spam

"Sebastiaan " <s.breedveld@erasmusmc.REMOVE.BOO.BOO.nl> skrev i en


meddelelse news:g1oito$8b0$1@fred.mathworks.com...
> This has a computational origin. When numbers in the matrix
> are close to the machine precision (eps), the number of
> independent rows from the computers' point of view is less
> than the number of independent rows from the mathematical
> point of view.
>
> A simple example. Take the following matrix:
> A = [1 0.705;
> 1.41 1];
> b = [1;
> sqrt(2)];
>
> Basically, we put sqrt(2) in 2 decimals precision in the
> matrix. Solving A\b gives
> [0.5;
> 0.708]
>
> However, putting
> c = [1;
> 1.41];
> and then A\c gives:
> [1;
> 0]
>
> as solution. So, rounding off can be bad.
>
> Now back to inverting a matrix. Say this is your real matrix:
> A = [1 0
> 0 1e-3];
> While this is a matrix with rank(2) (2 independent rows),
> the matrix is badly scaled, since the last ele

Vous aimerez peut-être aussi