The absolute value of a complex number z=(r,i) is |z| or abs(z), and can be found using good old trigonometry: |z| = sqrt(r2 + i2)

The absolute value of an n-dimentional vector v = (x1, x2, ... , xn) can similarly be found thus: |v| = sqrt(x12 + x22 + ... + xn2)