How to compute L1 norm of matrix in CVX?

(Kaka) #1


I would like to compute L1 norm of matrix M in CVX.
I know that, I can use sum(sum(abs(M))), but does anybody knows better approach?

(Michael C. Grant) #2

Define “better”… that should work just fine.

(Mark L. Stone) #3


You should read the CVX User Guide.



norms for real and complex vectors and matrices. Convex. Thus function follows the Matlab conventions closely. Thus the one-argument version norm(x) computes the 2-norm for vectors, and the 2-norm (maximum singular value) for matrices. The two-argument version norm(x,p) is supported as follows:

  • ‡ For vectors, all values p≥1 are accepted.
  • For matrices, p must be 1, 2, Inf, or ‘Fro’.

(Mark L. Stone) #4

Is sum(sum(abs(M))) a new definition of L1 norm of a matrix? Is L1 norm of a matrix something different than the 1-norm of a matrix? My previous answer addresses the 1-norm. It does not address sum(sum(abs(M))).

(Kaka) #5

Well, it depends on what is your definition from L1 norm of matrix.
Generally there is two different defination:
first: ||A||\_1=\sum_{i,j} ja_{ij} | which can introduce lot’s of sparsity on the problem

Second, is the induced norm definition. norm(M,1) compute induced norm for matrices.

(Mark L. Stone) #6


Do you have a link to this other definition of matrix L1 norm?

(Michael C. Grant) #7

Mark, I agree with you that the induced one-norm, as defined by norm(X,1), is the proper and standard way to define \|X\|_1 for matrices.

However, I’m afraid that some people do indeed use \|X\|\_1 to represent the sum(sum(X)) norm. This is often in papers involving low-rank approximations, sparse RPCA. I personally have used \|X\|\_{\ell_1} in these situations instead, and taken pains to define exactly what that means.