How to calculate the degrees of freedom of an $r$-ranked matrix with the size being $ntimes n$?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
9
down vote

favorite
5












Treat matrices as vectors lying in $mathbbR^n^2$. It can be imagined matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2−1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Typically, the number of independent constraints is equal to the difference between those two dimensions.



Alternatively, we call the dimension of that lower-dimensional manifold as "degrees of freedom".



Now how do we calculate the degrees of freedom of an $r$-ranked matrix with size $ntimes n$?



The answer says the degrees of freedom is $n^2-(n-r)^2=(2n-r)r$. I try to interpret it as follows:
First, by elementary matrices, every matrix $M$ with the rank of $r$ can be transformed into
$$Msimbeginpmatrix
I_r&0\
0&0
endpmatrix_ntimes n$$



Now the constraints come from the block at bottom right, where the entries are suppressed to be zero. So there are $(n-r)^2$ constraints, which lead to the answer (why the number of constraints do not agree with the number of zeroes is because they are not all independent, intuitively).



The explanation is not formal at all. Can anyone provide a refined version? Thank you~



EDIT: Provide further explanation of "degrees of freedom"







share|cite|improve this question


















  • 1




    Please make the body of the message self-contained; the title is like the writing on the spine of a book: you don't ask readers to read the spine so that the first page is understandable.
    – Arturo Magidin
    Jun 13 '11 at 18:41










  • I don't understand your question, or the answer, or your explanation. What is a "degree of freedom" of a matrix? I know what "degree of freedom" means for the homogeneous linear system represented by the matrix, but in that case the answer would be $n-r$. So I don't know what you mean.
    – Arturo Magidin
    Jun 13 '11 at 18:42






  • 2




    @Arturo Magidin, sorry for the ambiguity. Here I treat matrices as vectors lying in $mathbbR^n^2$. And matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2-1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Alternatively, we can call the dimension of that lower-dimensional manifold as "Degree of freedom".
    – ziyuang
    Jun 13 '11 at 19:14















up vote
9
down vote

favorite
5












Treat matrices as vectors lying in $mathbbR^n^2$. It can be imagined matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2−1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Typically, the number of independent constraints is equal to the difference between those two dimensions.



Alternatively, we call the dimension of that lower-dimensional manifold as "degrees of freedom".



Now how do we calculate the degrees of freedom of an $r$-ranked matrix with size $ntimes n$?



The answer says the degrees of freedom is $n^2-(n-r)^2=(2n-r)r$. I try to interpret it as follows:
First, by elementary matrices, every matrix $M$ with the rank of $r$ can be transformed into
$$Msimbeginpmatrix
I_r&0\
0&0
endpmatrix_ntimes n$$



Now the constraints come from the block at bottom right, where the entries are suppressed to be zero. So there are $(n-r)^2$ constraints, which lead to the answer (why the number of constraints do not agree with the number of zeroes is because they are not all independent, intuitively).



The explanation is not formal at all. Can anyone provide a refined version? Thank you~



EDIT: Provide further explanation of "degrees of freedom"







share|cite|improve this question


















  • 1




    Please make the body of the message self-contained; the title is like the writing on the spine of a book: you don't ask readers to read the spine so that the first page is understandable.
    – Arturo Magidin
    Jun 13 '11 at 18:41










  • I don't understand your question, or the answer, or your explanation. What is a "degree of freedom" of a matrix? I know what "degree of freedom" means for the homogeneous linear system represented by the matrix, but in that case the answer would be $n-r$. So I don't know what you mean.
    – Arturo Magidin
    Jun 13 '11 at 18:42






  • 2




    @Arturo Magidin, sorry for the ambiguity. Here I treat matrices as vectors lying in $mathbbR^n^2$. And matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2-1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Alternatively, we can call the dimension of that lower-dimensional manifold as "Degree of freedom".
    – ziyuang
    Jun 13 '11 at 19:14













up vote
9
down vote

favorite
5









up vote
9
down vote

favorite
5






5





Treat matrices as vectors lying in $mathbbR^n^2$. It can be imagined matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2−1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Typically, the number of independent constraints is equal to the difference between those two dimensions.



Alternatively, we call the dimension of that lower-dimensional manifold as "degrees of freedom".



Now how do we calculate the degrees of freedom of an $r$-ranked matrix with size $ntimes n$?



The answer says the degrees of freedom is $n^2-(n-r)^2=(2n-r)r$. I try to interpret it as follows:
First, by elementary matrices, every matrix $M$ with the rank of $r$ can be transformed into
$$Msimbeginpmatrix
I_r&0\
0&0
endpmatrix_ntimes n$$



Now the constraints come from the block at bottom right, where the entries are suppressed to be zero. So there are $(n-r)^2$ constraints, which lead to the answer (why the number of constraints do not agree with the number of zeroes is because they are not all independent, intuitively).



The explanation is not formal at all. Can anyone provide a refined version? Thank you~



EDIT: Provide further explanation of "degrees of freedom"







share|cite|improve this question














Treat matrices as vectors lying in $mathbbR^n^2$. It can be imagined matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2−1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Typically, the number of independent constraints is equal to the difference between those two dimensions.



Alternatively, we call the dimension of that lower-dimensional manifold as "degrees of freedom".



Now how do we calculate the degrees of freedom of an $r$-ranked matrix with size $ntimes n$?



The answer says the degrees of freedom is $n^2-(n-r)^2=(2n-r)r$. I try to interpret it as follows:
First, by elementary matrices, every matrix $M$ with the rank of $r$ can be transformed into
$$Msimbeginpmatrix
I_r&0\
0&0
endpmatrix_ntimes n$$



Now the constraints come from the block at bottom right, where the entries are suppressed to be zero. So there are $(n-r)^2$ constraints, which lead to the answer (why the number of constraints do not agree with the number of zeroes is because they are not all independent, intuitively).



The explanation is not formal at all. Can anyone provide a refined version? Thank you~



EDIT: Provide further explanation of "degrees of freedom"









share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jun 13 '11 at 19:23

























asked Jun 13 '11 at 18:32









ziyuang

1,2901826




1,2901826







  • 1




    Please make the body of the message self-contained; the title is like the writing on the spine of a book: you don't ask readers to read the spine so that the first page is understandable.
    – Arturo Magidin
    Jun 13 '11 at 18:41










  • I don't understand your question, or the answer, or your explanation. What is a "degree of freedom" of a matrix? I know what "degree of freedom" means for the homogeneous linear system represented by the matrix, but in that case the answer would be $n-r$. So I don't know what you mean.
    – Arturo Magidin
    Jun 13 '11 at 18:42






  • 2




    @Arturo Magidin, sorry for the ambiguity. Here I treat matrices as vectors lying in $mathbbR^n^2$. And matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2-1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Alternatively, we can call the dimension of that lower-dimensional manifold as "Degree of freedom".
    – ziyuang
    Jun 13 '11 at 19:14













  • 1




    Please make the body of the message self-contained; the title is like the writing on the spine of a book: you don't ask readers to read the spine so that the first page is understandable.
    – Arturo Magidin
    Jun 13 '11 at 18:41










  • I don't understand your question, or the answer, or your explanation. What is a "degree of freedom" of a matrix? I know what "degree of freedom" means for the homogeneous linear system represented by the matrix, but in that case the answer would be $n-r$. So I don't know what you mean.
    – Arturo Magidin
    Jun 13 '11 at 18:42






  • 2




    @Arturo Magidin, sorry for the ambiguity. Here I treat matrices as vectors lying in $mathbbR^n^2$. And matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2-1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Alternatively, we can call the dimension of that lower-dimensional manifold as "Degree of freedom".
    – ziyuang
    Jun 13 '11 at 19:14








1




1




Please make the body of the message self-contained; the title is like the writing on the spine of a book: you don't ask readers to read the spine so that the first page is understandable.
– Arturo Magidin
Jun 13 '11 at 18:41




Please make the body of the message self-contained; the title is like the writing on the spine of a book: you don't ask readers to read the spine so that the first page is understandable.
– Arturo Magidin
Jun 13 '11 at 18:41












I don't understand your question, or the answer, or your explanation. What is a "degree of freedom" of a matrix? I know what "degree of freedom" means for the homogeneous linear system represented by the matrix, but in that case the answer would be $n-r$. So I don't know what you mean.
– Arturo Magidin
Jun 13 '11 at 18:42




I don't understand your question, or the answer, or your explanation. What is a "degree of freedom" of a matrix? I know what "degree of freedom" means for the homogeneous linear system represented by the matrix, but in that case the answer would be $n-r$. So I don't know what you mean.
– Arturo Magidin
Jun 13 '11 at 18:42




2




2




@Arturo Magidin, sorry for the ambiguity. Here I treat matrices as vectors lying in $mathbbR^n^2$. And matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2-1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Alternatively, we can call the dimension of that lower-dimensional manifold as "Degree of freedom".
– ziyuang
Jun 13 '11 at 19:14





@Arturo Magidin, sorry for the ambiguity. Here I treat matrices as vectors lying in $mathbbR^n^2$. And matrices with rank $r (r<n)$ are supposed to lie within a manifold of lower dimension. For example, the singular matrices lie within a $(n^2-1)$-dimensional manifold, because they satisfy $det(M)=0$, the sole constraint. Alternatively, we can call the dimension of that lower-dimensional manifold as "Degree of freedom".
– ziyuang
Jun 13 '11 at 19:14











1 Answer
1






active

oldest

votes

















up vote
11
down vote



accepted










Generically, the following procedure can be used to construct an $ntimes n$ matrix with rank $r$:



  1. Choose the first $r$ columns of the matrix, with $n$ degrees of freedom for each column. Generically, the results will be linearly independent.


  2. We can now choose the remaining columns to be linear combinations of the first $r$ columns. This gives $r$ degrees of freedom for each column, namely the $r$ coefficients of the linear combinations.


Thus, the dimension of the space of rank-$r$ matrices is
$$
rn + (n-r)rtext,
$$
which is the same as $n^2 - (n-r)^2$.






share|cite|improve this answer
















  • 1




    Of course, it doesn't have to be the first $r$ columns that are linearly independent, but the union of a finite number of sets, each with $d$ degrees of freedom, still has $d$ degrees of freedom.
    – Robert Israel
    Jun 13 '11 at 19:42






  • 1




    @Robert: Right, the first $r$ columns aren't necessarily linearly independent, but this is generically true, meaning true on a dense open subset of the rank-$r$ matrices. When computing the dimension of a space, it always works to count the degrees of freedom for a generic point.
    – Jim Belk
    Jun 13 '11 at 20:01










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f45159%2fhow-to-calculate-the-degrees-of-freedom-of-an-r-ranked-matrix-with-the-size-be%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
11
down vote



accepted










Generically, the following procedure can be used to construct an $ntimes n$ matrix with rank $r$:



  1. Choose the first $r$ columns of the matrix, with $n$ degrees of freedom for each column. Generically, the results will be linearly independent.


  2. We can now choose the remaining columns to be linear combinations of the first $r$ columns. This gives $r$ degrees of freedom for each column, namely the $r$ coefficients of the linear combinations.


Thus, the dimension of the space of rank-$r$ matrices is
$$
rn + (n-r)rtext,
$$
which is the same as $n^2 - (n-r)^2$.






share|cite|improve this answer
















  • 1




    Of course, it doesn't have to be the first $r$ columns that are linearly independent, but the union of a finite number of sets, each with $d$ degrees of freedom, still has $d$ degrees of freedom.
    – Robert Israel
    Jun 13 '11 at 19:42






  • 1




    @Robert: Right, the first $r$ columns aren't necessarily linearly independent, but this is generically true, meaning true on a dense open subset of the rank-$r$ matrices. When computing the dimension of a space, it always works to count the degrees of freedom for a generic point.
    – Jim Belk
    Jun 13 '11 at 20:01














up vote
11
down vote



accepted










Generically, the following procedure can be used to construct an $ntimes n$ matrix with rank $r$:



  1. Choose the first $r$ columns of the matrix, with $n$ degrees of freedom for each column. Generically, the results will be linearly independent.


  2. We can now choose the remaining columns to be linear combinations of the first $r$ columns. This gives $r$ degrees of freedom for each column, namely the $r$ coefficients of the linear combinations.


Thus, the dimension of the space of rank-$r$ matrices is
$$
rn + (n-r)rtext,
$$
which is the same as $n^2 - (n-r)^2$.






share|cite|improve this answer
















  • 1




    Of course, it doesn't have to be the first $r$ columns that are linearly independent, but the union of a finite number of sets, each with $d$ degrees of freedom, still has $d$ degrees of freedom.
    – Robert Israel
    Jun 13 '11 at 19:42






  • 1




    @Robert: Right, the first $r$ columns aren't necessarily linearly independent, but this is generically true, meaning true on a dense open subset of the rank-$r$ matrices. When computing the dimension of a space, it always works to count the degrees of freedom for a generic point.
    – Jim Belk
    Jun 13 '11 at 20:01












up vote
11
down vote



accepted







up vote
11
down vote



accepted






Generically, the following procedure can be used to construct an $ntimes n$ matrix with rank $r$:



  1. Choose the first $r$ columns of the matrix, with $n$ degrees of freedom for each column. Generically, the results will be linearly independent.


  2. We can now choose the remaining columns to be linear combinations of the first $r$ columns. This gives $r$ degrees of freedom for each column, namely the $r$ coefficients of the linear combinations.


Thus, the dimension of the space of rank-$r$ matrices is
$$
rn + (n-r)rtext,
$$
which is the same as $n^2 - (n-r)^2$.






share|cite|improve this answer












Generically, the following procedure can be used to construct an $ntimes n$ matrix with rank $r$:



  1. Choose the first $r$ columns of the matrix, with $n$ degrees of freedom for each column. Generically, the results will be linearly independent.


  2. We can now choose the remaining columns to be linear combinations of the first $r$ columns. This gives $r$ degrees of freedom for each column, namely the $r$ coefficients of the linear combinations.


Thus, the dimension of the space of rank-$r$ matrices is
$$
rn + (n-r)rtext,
$$
which is the same as $n^2 - (n-r)^2$.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jun 13 '11 at 19:35









Jim Belk

36.7k283147




36.7k283147







  • 1




    Of course, it doesn't have to be the first $r$ columns that are linearly independent, but the union of a finite number of sets, each with $d$ degrees of freedom, still has $d$ degrees of freedom.
    – Robert Israel
    Jun 13 '11 at 19:42






  • 1




    @Robert: Right, the first $r$ columns aren't necessarily linearly independent, but this is generically true, meaning true on a dense open subset of the rank-$r$ matrices. When computing the dimension of a space, it always works to count the degrees of freedom for a generic point.
    – Jim Belk
    Jun 13 '11 at 20:01












  • 1




    Of course, it doesn't have to be the first $r$ columns that are linearly independent, but the union of a finite number of sets, each with $d$ degrees of freedom, still has $d$ degrees of freedom.
    – Robert Israel
    Jun 13 '11 at 19:42






  • 1




    @Robert: Right, the first $r$ columns aren't necessarily linearly independent, but this is generically true, meaning true on a dense open subset of the rank-$r$ matrices. When computing the dimension of a space, it always works to count the degrees of freedom for a generic point.
    – Jim Belk
    Jun 13 '11 at 20:01







1




1




Of course, it doesn't have to be the first $r$ columns that are linearly independent, but the union of a finite number of sets, each with $d$ degrees of freedom, still has $d$ degrees of freedom.
– Robert Israel
Jun 13 '11 at 19:42




Of course, it doesn't have to be the first $r$ columns that are linearly independent, but the union of a finite number of sets, each with $d$ degrees of freedom, still has $d$ degrees of freedom.
– Robert Israel
Jun 13 '11 at 19:42




1




1




@Robert: Right, the first $r$ columns aren't necessarily linearly independent, but this is generically true, meaning true on a dense open subset of the rank-$r$ matrices. When computing the dimension of a space, it always works to count the degrees of freedom for a generic point.
– Jim Belk
Jun 13 '11 at 20:01




@Robert: Right, the first $r$ columns aren't necessarily linearly independent, but this is generically true, meaning true on a dense open subset of the rank-$r$ matrices. When computing the dimension of a space, it always works to count the degrees of freedom for a generic point.
– Jim Belk
Jun 13 '11 at 20:01

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f45159%2fhow-to-calculate-the-degrees-of-freedom-of-an-r-ranked-matrix-with-the-size-be%23new-answer', 'question_page');

);

Post as a guest













































































這個網誌中的熱門文章

How to combine Bézier curves to a surface?

Why am i infinitely getting the same tweet with the Twitter Search API?

Is there any way to eliminate the singular point to solve this integral by hand or by approximations?