Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I express the matlab function abs(M), on a matrix M, in mathematical terms?

I thought about norms or just |M|, but these return scalars, not another matrix of the same size as M.

Sorry for the rough explanation, english isn't my primary language.

share|cite|improve this question
One speaks of taking the absolute value "componentwise" or "elementwise". I don't know of any other name or notation for this operation. – joriki Mar 11 '11 at 13:15

I think you can also denote the matrix M by giving its generic (i, j)-entry with parenthesis around:

M = (mij).

So Matlab's "abs(M)" would simply be: (|mij|).

share|cite|improve this answer

'help abs' returns ABS(X) is the absolute value of the elements of X.

If $ M = [a _{ij}] $ where $a _{ij} \in R$, $i=1...m$ , $j=1..n$ Then $ABS(M) = [ABS(a _{ij})]$

Note: it's not a must for $a _{ij} \in R$ and can be also complex.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.