Orthonormal basis of a Null Space

Open discussion regarding features, bugs, issues, vendors, etc.

Orthonormal basis of a Null Space

Postby Vivek456 » Sat Oct 27, 2012 6:22 am

Hi There,

I am trying to find the orthonormal basis of the null space as defined by the matrix A (mxn).

I tried the following steps:

1) Did the QR decomposition on the transpose of A using DGEQRF.
2) Directed the resulting output of A to DORMQR.

I was expecting the last (n-m) columns of C should contain the orthonormal basis of the null space but does not seem so.

Could you pls clarify if these are the right steps?

I have also tried DGESVD and it worked correctly as long as m is 1. When m happened to be greater than 1 but less than n, this method didn't give correct results.

Are there any other methods?

Regards,
Vivek.
Vivek456
 
Posts: 2
Joined: Sat Oct 27, 2012 5:48 am

Re: Orthonormal basis of a Null Space

Postby Vivek456 » Sat Oct 27, 2012 10:47 am

Hello,

I got it working with DGESVD. I am now able to get orthonormal basis of a null space. The previous problem was with the column and row ordering between fortran and C/C++.

Now I am using lapacke libraries instead of lapack. With lapacke, I am able to control the major order.

Following is the api that worked correctly:

info = LAPACKE_dgesvd(LAPACK_ROW_MAJOR, jobu, jobvt, m, n, &a[0][0], lda, s, &u[0][0], ldu, &vt[0][0], ldvt, superb);

Previously I used to use:

dgesvd_(&jobu, &jobvt, &m, &n, &a[0][0], &lda, &s[0], &u[0][0], &ldu, &vt[0][0], &ldvt, work, &lwork, &info);

Following link helped me fixed the problem:

http://software.intel.com/sites/product ... dgesvd.htm

Thanks for the wonderful package! :)

Regards,
Vivek.
Vivek456
 
Posts: 2
Joined: Sat Oct 27, 2012 5:48 am


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron