Trace Norm / Nuclear Norm: How to verify? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How is the nuclear norm convex whereas the weighted nuclear norm is not?How close is Cartesian product of unit orthogonal bases of SVD to identity matrix?How to define the nuclear norm of a tensor?Variational characterization of nuclear normDistributive property on trace normInequality of square root inside trace normShow that $mathbfX_tr leq sqrtnm f(mathbfX)$computing dual matrix trace norm and tensor gradient in pythonDerivative of the nuclear norm $left$ with respect to $X$Additivity of nuclear norm for projections

Nested ellipses in tikzpicture: Chomsky hierarchy

Using dividends to reduce short term capital gains?

Single author papers against my advisor's will?

What force causes entropy to increase?

Why can I use a list index as an indexing variable in a for loop?

Why are PDP-7-style microprogrammed instructions out of vogue?

Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

Deal with toxic manager when you can't quit

Windows 10: How to Lock (not sleep) laptop on lid close?

How to create a folder symlink that has a different name?

How do spell lists change if the party levels up without taking a long rest?

Did the new image of black hole confirm the general theory of relativity?

How to determine omitted units in a publication

Am I ethically obligated to go into work on an off day if the reason is sudden?

how can a perfect fourth interval be considered either consonant or dissonant?

What aspect of planet earth must be changed to prevent the industrial revolution?

ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?

Why can't wing-mounted spoilers be used to steepen approaches?

Fixing different display colors within string

Voltage transmission

Is an up-to-date browser secure on an out-of-date OS?

Do I have Disadvantage attacking with an off-hand weapon?

What happens to a Warlock's expended Spell Slots when they gain a Level?



Trace Norm / Nuclear Norm: How to verify?



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How is the nuclear norm convex whereas the weighted nuclear norm is not?How close is Cartesian product of unit orthogonal bases of SVD to identity matrix?How to define the nuclear norm of a tensor?Variational characterization of nuclear normDistributive property on trace normInequality of square root inside trace normShow that $mathbfX_tr leq sqrtnm f(mathbfX)$computing dual matrix trace norm and tensor gradient in pythonDerivative of the nuclear norm $_*$ with respect to $X$Additivity of nuclear norm for projections










1












$begingroup$


The nuclear norm is defined by this [from wikipedia]:



$$|A|_* = texttrace(sqrtA^*A) = sum_i=i^minm,nsigma_i(A)$$



I get the derivation of this equation. However, I wanted to test it in MATLAB. So used this script:



clc;
clear;
close all;

P = rand([3,4]);
PTP = P'*P;

%compute trace(P'*P)
B = sqrt(P'*P);
S1 = trace(B)

%Compute sum of sigma_i(P)
E = svd(P);
S2 = sum(E)

%Do the same for eigenvalues
E3 = sqrt(eig(P*P'));
S3 = sum(E3)


But for some reason, the values inside S1 and S2 does not match. I do not understand where I did wrong. Could anybody help?










share|cite|improve this question











$endgroup$











  • $begingroup$
    Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
    $endgroup$
    – mathreadler
    Apr 9 at 7:34















1












$begingroup$


The nuclear norm is defined by this [from wikipedia]:



$$|A|_* = texttrace(sqrtA^*A) = sum_i=i^minm,nsigma_i(A)$$



I get the derivation of this equation. However, I wanted to test it in MATLAB. So used this script:



clc;
clear;
close all;

P = rand([3,4]);
PTP = P'*P;

%compute trace(P'*P)
B = sqrt(P'*P);
S1 = trace(B)

%Compute sum of sigma_i(P)
E = svd(P);
S2 = sum(E)

%Do the same for eigenvalues
E3 = sqrt(eig(P*P'));
S3 = sum(E3)


But for some reason, the values inside S1 and S2 does not match. I do not understand where I did wrong. Could anybody help?










share|cite|improve this question











$endgroup$











  • $begingroup$
    Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
    $endgroup$
    – mathreadler
    Apr 9 at 7:34













1












1








1





$begingroup$


The nuclear norm is defined by this [from wikipedia]:



$$|A|_* = texttrace(sqrtA^*A) = sum_i=i^minm,nsigma_i(A)$$



I get the derivation of this equation. However, I wanted to test it in MATLAB. So used this script:



clc;
clear;
close all;

P = rand([3,4]);
PTP = P'*P;

%compute trace(P'*P)
B = sqrt(P'*P);
S1 = trace(B)

%Compute sum of sigma_i(P)
E = svd(P);
S2 = sum(E)

%Do the same for eigenvalues
E3 = sqrt(eig(P*P'));
S3 = sum(E3)


But for some reason, the values inside S1 and S2 does not match. I do not understand where I did wrong. Could anybody help?










share|cite|improve this question











$endgroup$




The nuclear norm is defined by this [from wikipedia]:



$$|A|_* = texttrace(sqrtA^*A) = sum_i=i^minm,nsigma_i(A)$$



I get the derivation of this equation. However, I wanted to test it in MATLAB. So used this script:



clc;
clear;
close all;

P = rand([3,4]);
PTP = P'*P;

%compute trace(P'*P)
B = sqrt(P'*P);
S1 = trace(B)

%Compute sum of sigma_i(P)
E = svd(P);
S2 = sum(E)

%Do the same for eigenvalues
E3 = sqrt(eig(P*P'));
S3 = sum(E3)


But for some reason, the values inside S1 and S2 does not match. I do not understand where I did wrong. Could anybody help?







linear-algebra norm svd






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Apr 9 at 7:32









mathreadler

15.5k72263




15.5k72263










asked Apr 8 at 5:57









ponirponir

528




528











  • $begingroup$
    Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
    $endgroup$
    – mathreadler
    Apr 9 at 7:34
















  • $begingroup$
    Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
    $endgroup$
    – mathreadler
    Apr 9 at 7:34















$begingroup$
Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
$endgroup$
– mathreadler
Apr 9 at 7:34




$begingroup$
Welcome to the site by the way. It can be good to learn mathjax typesetting for this site. I helped you turn the wikipedia equation into mathjax code. I think there is a tutorial somewhere. math.meta.stackexchange.com/questions/5020/…
$endgroup$
– mathreadler
Apr 9 at 7:34










1 Answer
1






active

oldest

votes


















2












$begingroup$

On the line



B = sqrt(P'*P);


"sqrt" in Matlab calculates element-wise square root.



You probably want to use "sqrtm" : matrix square root instead.






share|cite|improve this answer









$endgroup$












  • $begingroup$
    That solves the problem! I forgot that it does element wise square root! :(
    $endgroup$
    – ponir
    Apr 9 at 0:22










  • $begingroup$
    @ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
    $endgroup$
    – mathreadler
    Apr 9 at 7:30











Your Answer








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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
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%2f3179218%2ftrace-norm-nuclear-norm-how-to-verify%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2












$begingroup$

On the line



B = sqrt(P'*P);


"sqrt" in Matlab calculates element-wise square root.



You probably want to use "sqrtm" : matrix square root instead.






share|cite|improve this answer









$endgroup$












  • $begingroup$
    That solves the problem! I forgot that it does element wise square root! :(
    $endgroup$
    – ponir
    Apr 9 at 0:22










  • $begingroup$
    @ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
    $endgroup$
    – mathreadler
    Apr 9 at 7:30















2












$begingroup$

On the line



B = sqrt(P'*P);


"sqrt" in Matlab calculates element-wise square root.



You probably want to use "sqrtm" : matrix square root instead.






share|cite|improve this answer









$endgroup$












  • $begingroup$
    That solves the problem! I forgot that it does element wise square root! :(
    $endgroup$
    – ponir
    Apr 9 at 0:22










  • $begingroup$
    @ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
    $endgroup$
    – mathreadler
    Apr 9 at 7:30













2












2








2





$begingroup$

On the line



B = sqrt(P'*P);


"sqrt" in Matlab calculates element-wise square root.



You probably want to use "sqrtm" : matrix square root instead.






share|cite|improve this answer









$endgroup$



On the line



B = sqrt(P'*P);


"sqrt" in Matlab calculates element-wise square root.



You probably want to use "sqrtm" : matrix square root instead.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Apr 8 at 6:06









mathreadlermathreadler

15.5k72263




15.5k72263











  • $begingroup$
    That solves the problem! I forgot that it does element wise square root! :(
    $endgroup$
    – ponir
    Apr 9 at 0:22










  • $begingroup$
    @ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
    $endgroup$
    – mathreadler
    Apr 9 at 7:30
















  • $begingroup$
    That solves the problem! I forgot that it does element wise square root! :(
    $endgroup$
    – ponir
    Apr 9 at 0:22










  • $begingroup$
    @ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
    $endgroup$
    – mathreadler
    Apr 9 at 7:30















$begingroup$
That solves the problem! I forgot that it does element wise square root! :(
$endgroup$
– ponir
Apr 9 at 0:22




$begingroup$
That solves the problem! I forgot that it does element wise square root! :(
$endgroup$
– ponir
Apr 9 at 0:22












$begingroup$
@ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
$endgroup$
– mathreadler
Apr 9 at 7:30




$begingroup$
@ponir It is good because it meant you did not misunderstand something. It is same with other matrix functions in Matlab, they end with letter "m", for example expm for matrix exponential function. If you are happy with answer please press accept answer button. :)
$endgroup$
– mathreadler
Apr 9 at 7:30

















draft saved

draft discarded
















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3179218%2ftrace-norm-nuclear-norm-how-to-verify%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

What does it mean to find percent difference when two values are equivalent? The 2019 Stack Overflow Developer Survey Results Are InWhat does “percent of change” mean?Find what percent X is between two numbers?Unable to determine 'original amount' in simple percentage problemsWhat is the correct percent difference formula?How does proportionality hold when quantities are high? And the percentage increase formulaprofit and loss GRE questionProfitability calculationWhat is the difference between $xtimes 0.8$ and $x div 1.2 ? $Finding the percent probability of completing BUDs trainingCalculating Percent Difference with zero and near zero values

Why did some early computer designers eschew integers?What register size did early computers use?What other computers used this floating-point format?Why did so many early microcomputers use the MOS 6502 and variants?Why were early computers named “Mark”?Why did expert systems fall?Why were early personal computer monitors not green?When did “Zen” in computer programming become a thing?History of advanced hardwareWere there any working computers using residue number systems?Why did some CPUs use two Read/Write lines, and others just one?

How to avoid repetitive long generic constraints in Rust The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceIs it possible to automatically implement a trait for any tuple that is made up of types that all implement the trait?Is there a constraint that restricts my generic method to numeric types?How can foreign key constraints be temporarily disabled using T-SQL?How do I use reflection to call a generic method?How to create a generic array in Java?How to get a class instance of generics type THow is `last` allowed to be called for an Args value?How to implement a trait for a parameterized traitAvoiding PhantomData in a struct to enforce type constraintsIs it possible to return part of a struct by reference?Associated References types as Value Types