Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
why the sigma of symmetrical svd for a real symmetric matrix is negative?

Subject: why the sigma of symmetrical svd for a real symmetric matrix is negative?

From: Rick

Date: 27 Dec, 2012 02:25:09

Message: 1 of 5

  Hi everyone,
 as we know, for a real symmetric matrix A, A, there exists a singular value decomposition as A=USU', and S should be a rectangular diagonal matrix with nonnegative real numbers on the diagonal. But when I use the command schur(),
it seems that S appears negative real numbers on the diagonal as the following. Is there any problem?

Thanks a lots!


>>A=
   -1.3410 0.5350 0.2995 -1.1138
    0.5350 -2.5191 -0.1422 0.4953
    0.2995 -0.1422 -1.4695 0.2981
   -1.1138 0.4953 0.2981 -2.2897

>>[u,s]=schur(A)

u =

   -0.4768 -0.2191 0.0448 0.8501
    0.5549 -0.8260 0.0177 0.0974
    0.1944 0.1630 0.9621 0.1004
   -0.6534 -0.4931 0.2685 -0.5078


s =

   -3.6119 0 0 0
         0 -2.0534 0 0
         0 0 -1.3749 0
         0 0 0 -0.5790

Subject: why the sigma of symmetrical svd for a real symmetric matrix

From: Nasser M. Abbasi

Date: 27 Dec, 2012 02:59:42

Message: 2 of 5

On 12/26/2012 8:25 PM, Rick wrote:
> Hi everyone,
> as we know, for a real symmetric matrix A, A, there exists a singular value
>decomposition as A=USU', and S should be a rectangular diagonal matrix with
>nonnegative real numbers on the diagonal. But when I use the command schur(),
> it seems that S appears negative real numbers on the diagonal as the following.
>Is there any problem?
>
> Thanks a lots!
>
>
>>> A=
> -1.3410 0.5350 0.2995 -1.1138
> 0.5350 -2.5191 -0.1422 0.4953
> 0.2995 -0.1422 -1.4695 0.2981
> -1.1138 0.4953 0.2981 -2.2897
>
>>> [u,s]=schur(A)
>
> u =
>
> -0.4768 -0.2191 0.0448 0.8501
> 0.5549 -0.8260 0.0177 0.0974
> 0.1944 0.1630 0.9621 0.1004
> -0.6534 -0.4931 0.2685 -0.5078
>
>
> s =
>
> -3.6119 0 0 0
> 0 -2.0534 0 0
> 0 0 -1.3749 0
> 0 0 0 -0.5790
>

Just wanted to say that the result by Matlab matches
that of Mathematica.

mat = {{-1.3410, 0.5350, 0.2995, -1.1138},
   {0.5350, -2.5191, -0.1422, 0.4953},
   {0.2995, -0.1422, -1.4695, 0.2981},
   {-1.1138, 0.4953, 0.2981, -2.2897}}

Chop@SchurDecomposition[mat][[2]]

{{-3.61188, 0, 0, 0},
  {0, -0.579018, 0, 0},
  {0, 0, -2.05345, 0},
  {0, 0, 0, -1.37496}}

(order is just different, but values the same)

--Nasser

Subject: why the sigma of symmetrical svd for a real symmetric matrix is negative?

From: Roger Stafford

Date: 27 Dec, 2012 04:39:09

Message: 3 of 5

"Rick" wrote in message <kbgbi5$g5n$1@newscl01ah.mathworks.com>...
> as we know, for a real symmetric matrix A, A, there exists a singular value decomposition as A=USU', and S should be a rectangular diagonal matrix with nonnegative real numbers on the diagonal. But when I use the command schur(),
> it seems that S appears negative real numbers on the diagonal as the following. Is there any problem?
 - - - - - - - - - -
  Unless your A matrix is positive definite there is no reason its singular value and schur decompositions should be the same, and the A you have defined is certainly not positive definite. In fact all its eigenvalues are negative. Check the Wikipedia site:

 http://en.wikipedia.org/wiki/Schur_decomposition

Roger Stafford

Subject: why the sigma of symmetrical svd for a real symmetric matrix is negative?

From: Bruno Luong

Date: 27 Dec, 2012 07:22:09

Message: 4 of 5

"Rick" wrote in message <kbgbi5$g5n$1@newscl01ah.mathworks.com>...
> Hi everyone,
> as we know, for a real symmetric matrix A, A, there exists a singular value decomposition as A=USU', and S should be a rectangular diagonal matrix with nonnegative real numbers on the diagonal.

It is a wrong statement, as Roger has pointed it out.

Take an extreme case where A is 1x1. Any matrix is symmetric, the svd is: U = V = 1, and S = A(1,1). There is no reason for A(1,1) to be positive.

Bruno

Subject: why the sigma of symmetrical svd for a real symmetric matrix is negative?

From: Greg Heath

Date: 28 Dec, 2012 00:30:09

Message: 5 of 5

"Rick" wrote in message <kbgbi5$g5n$1@newscl01ah.mathworks.com>...
> Hi everyone,
> as we know, for a real symmetric matrix A, A, there exists a singular value decomposition as A=USU', and S should be a rectangular diagonal matrix with nonnegative real numbers on the diagonal. But when I use the command schur(),
> it seems that S appears negative real numbers on the diagonal as the following. Is there any problem?
>
> Thanks a lots!
>
>
> >>A=
> -1.3410 0.5350 0.2995 -1.1138
> 0.5350 -2.5191 -0.1422 0.4953
> 0.2995 -0.1422 -1.4695 0.2981
> -1.1138 0.4953 0.2981 -2.2897
>
> >>[u,s]=schur(A)
>
> u =
>
> -0.4768 -0.2191 0.0448 0.8501
> 0.5549 -0.8260 0.0177 0.0974
> 0.1944 0.1630 0.9621 0.1004
> -0.6534 -0.4931 0.2685 -0.5078
>
>
> s =
>
> -3.6119 0 0 0
> 0 -2.0534 0 0
> 0 0 -1.3749 0
> 0 0 0 -0.5790

Read the documentation

help schur

doc schur

The schur deconposition yields eigenvalues, not singular values

>> eig(A)

ans =

      -3.6119
      -2.0534
       -1.375
     -0.57902

>> svd(A)

ans =

       3.6119
       2.0534
        1.375
      0.57902

Hope this helps

Greg

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us