gives a pseudorandom complex number with real and imaginary parts in the range 0 to 1.
RandomComplex[{zmin,zmax}]
gives a pseudorandom complex number in the rectangle with corners given by the complex numbers zmin and zmax.
RandomComplex[zmax]
gives a pseudorandom complex number in the rectangle whose corners are the origin and zmax.
RandomComplex[range,n]
gives a list of n pseudorandom complex numbers.
RandomComplex[range,{n1,n2,…}]
gives an n1×n2×… array of pseudorandom complex numbers.
RandomComplex
gives a pseudorandom complex number with real and imaginary parts in the range 0 to 1.
RandomComplex[{zmin,zmax}]
gives a pseudorandom complex number in the rectangle with corners given by the complex numbers zmin and zmax.
RandomComplex[zmax]
gives a pseudorandom complex number in the rectangle whose corners are the origin and zmax.
RandomComplex[range,n]
gives a list of n pseudorandom complex numbers.
RandomComplex[range,{n1,n2,…}]
gives an n1×n2×… array of pseudorandom complex numbers.
Details and Options
- RandomComplex chooses complex numbers with a uniform probability distribution in the rectangle specified.
- RandomComplex[range,WorkingPrecision->n] yields complex numbers with n-digit precision. Leading or trailing digits in the generated number can turn out to be 0.
- RandomComplex gives a different sequence of pseudorandom complex numbers whenever you run the Wolfram Language. You can start with a particular seed using SeedRandom.
- A Method option to SeedRandom can be given to specify the pseudorandom generator used.
Examples
open all close allBasic Examples (5)
A random complex number with real and imaginary parts in the range 0 to 1:
RandomComplex[]A random complex number in the rectangle with corners at
and
:
RandomComplex[{-2 - I, 5 + 3I}]A random complex number in the rectangle with corners at
and
:
RandomComplex[10 + 5I]5 random complex numbers in the unit square:
RandomComplex[1 + I, 5]A 3×2 array of random complex numbers in the rectangle with corners at
and
:
RandomComplex[{2 + I, 10 + 20I}, {3, 2}]Scope (3)
Generate random complex numbers of any magnitude:
RandomComplex[10 ^ 1000 + 10 ^ 1000I]Generate random complex numbers of any precision:
RandomComplex[WorkingPrecision -> 30]RandomComplex[10 ^ 1000 + 10 ^ 1000I, WorkingPrecision -> 50]Generate low-precision complex numbers:
RandomComplex[{-1 - I, 1 + I}, 5, WorkingPrecision -> 5]Options (1)
Applications (2)
Properties & Relations (4)
Use SeedRandom to get repeatable random values:
{RandomComplex[], RandomComplex[]}{SeedRandom[1234];RandomComplex[], SeedRandom[1234];RandomComplex[]}Use BlockRandom to block one use of RandomComplex from affecting others:
{BlockRandom[RandomComplex[]], RandomComplex[]}With the same seed, RandomComplex generates the "same" number, regardless of precision:
Table[SeedRandom[4567];RandomComplex[WorkingPrecision -> p], {p, 10}]RandomComplex generates a uniform distribution, here with mean
:
Mean[RandomComplex[1 + 1I, 10000]]Tech Notes
History
Text
Wolfram Research (2007), RandomComplex, Wolfram Language function, https://reference.wolfram.com/language/ref/RandomComplex.html.
CMS
Wolfram Language. 2007. "RandomComplex." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RandomComplex.html.
APA
Wolfram Language. (2007). RandomComplex. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RandomComplex.html
BibTeX
@misc{reference.wolfram_2026_randomcomplex, author="Wolfram Research", title="{RandomComplex}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/RandomComplex.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_randomcomplex, organization={Wolfram Research}, title={RandomComplex}, year={2007}, url={https://reference.wolfram.com/language/ref/RandomComplex.html}, note=[Accessed: 15-June-2026]}