# [Numpy-discussion] Rank deficient matrices

Paul F. Dubois paul at pfdubois.com
Tue Oct 30 07:21:07 CST 2001

Use LinearAlgebra.singular_value_decomposition

-----Original Message-----
[mailto:numpy-discussion-admin at lists.sourceforge.net] On Behalf Of Nils
Wagner
Sent: Tuesday, October 30, 2001 12:24 AM
To: numpy-discussion at lists.sourceforge.net
Subject: [Numpy-discussion] Rank deficient matrices

Hi,

Let us assume that

r = rank(C) < N               (1)

where C is a symmetric NxN matrix. This implies that the number of
non-zero eigenvalues of C is r. Because C is a symmetric matrix there
exists an orthogonal matrix U whose columns are the eigenvectors of C
such that

U^\top C U = [ d , O
O , O].         (2)

In the above equation d \in rxr is a diagonal matrix consisting of only
the non-zero eigenvalues of C. For convenience, partition U as

U = [U_1 | U_2]                (3)

where the columns of U_1 (Nxr) are the eigenvectors corresponding to the
non-zero block d and the columns of U_2 are the eigenvectors
corresponding to the rest
(N-r) number
of zero eigenvalues.

Defining a rectangular transformation matrix

R = U_1                        (4)

it is easy to show that

R^\top C R = d.                 (5)

Therefore, the matrix R in equation (4) transforms the originally rank
deficient matrix C to a full-rank (diagonal) matrix of rank r.

I am looking for an efficient Numpy implementation of this
transformation.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9167575240135193, "perplexity": 5032.999399702827}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-22/segments/1495463608877.60/warc/CC-MAIN-20170527075209-20170527095209-00250.warc.gz"}