i
Imaginary unit (alias for 1i); also available as I, j, J.
Syntax
Section titled “Syntax”b = ib = Ib = jb = JDescription
Section titled “Description”Returns the imaginary unit √-1. Equivalent to the literal 1i. Available under four interchangeable names — i, I, j, J — so J (engineering convention, capitalized) and i (math convention, lowercase) work the same way.
Caveat: if you assign a value to i (e.g. for i = 1:n), that local definition shadows the constant. Prefer the explicit 1i literal in numeric expressions to avoid the shadow, or use a less-common alias like I or J that you’re less likely to overwrite.
Examples
Section titled “Examples”i^2 % -1(2 + 3*i) * (1 - i) % 5 + iI + J % 0 + 2i (same constant)See also
Section titled “See also”j— Imaginary unit, engineering notation; aliasesi,I,J.