# How to compute L1 norm of matrix in CVX?

Hi,

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?

Define “better”… that should work just fine.

norm(M,1)

You should read the CVX User Guide.

norm

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’.

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))).

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.

Hi,

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

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.

1 Like