title: How to calculate 2-norm of a matrix efficiently?
body: <p>Suppose I have a matrix A. I want to calculate its 2-norm/spectral norm. How can I calculate this efficiently?</p>
  
  <p>I know 2-norm of a matrix is equal to its largest singular value. So, result of the following MATLAB code will be zero</p>
  
  <pre><code>&gt;&gt; [u,s,v]=svd(A,'econ');
  norm(A,2)-s(1,1)
  </code></pre>
  
  <p>But to know 2-norm I have to calculate SVD of full matrix A, is there any efficient way to calculate 2-norm? Answer in form of MATLAB code will be much appereciated.</p>