Skip to content

Re ​

The real part of a complex number. An alias for Real, the preferred name.

✓ checked against that system · ! checked, with disagreements (hover a chip)FungrimReWolfram LanguageRe!
Re(complex | infinity) -> numberthe real part of zz; distributes over a symbolic real value unchanged.
SageMathreal_part(complex | infinity)SymPyre(complex | infinity)mpmathre(complex | infinity)
Typed signatures
TypePackageApplies
(complex | infinity) -> numbercompute-enginealways

Domain: Compute engine

Details
  • A Gaussian integer is a complex number with integer parts, so Re and Imaginary read its two coordinates; there is no separate head for them.

Plot

ComplexPlot
real slice

Examples

Basic #

Re(3+4i)=3\mathrm{Re}(3+4i) = 3

live ↗
InRe(3+4i)\mathrm{Re}(3+4i)Out33

Re of a real number is itself

live ↗
InRe(5)\mathrm{Re}(5)Out55

Re of π\pi is π\pi, a real symbolic constant

live ↗
InRe(π)\mathrm{Re}(π)Outππ
live ↗
Inℜ(2+3i)\Re(2+3i)Out22
live ↗
Inℜ(2e(1/3)iπ)\Re(2e^{(1/3)i π})Out11
Scope #
live ↗
Inℜ(32+45i)\Re(\frac{3}{2}+\frac{4}{5}i)Out32\frac{3}{2}
live ↗
InN(ℜ(e+iπ),25)N(\Re(e+i π), 25)Out2.718 281 828 459 045 235 360 2872.718\,281\,828\,459\,045\,235\,360\,287
live ↗
Inℜ(4125−2i)\Re(\frac{41}{25}-2i)Out4125\frac{41}{25}
live ↗
Inℜ([[1,u],[v,−i]])\Re(\bigl\lbrack\bigl\lbrack1, u\bigr\rbrack, \bigl\lbrack v, -i\bigr\rbrack\bigr\rbrack)Out[[1,ℜ(u)],[ℜ(v),0]]\bigl\lbrack\bigl\lbrack1, \Re(u)\bigr\rbrack, \bigl\lbrack\Re(v), 0\bigr\rbrack\bigr\rbrack
live ↗
Inℜ(0)\Re(0)Out00
live ↗
Inℜ(∞)\Re(∞)Out∞∞
live ↗
Inℜ(∞i)\Re(∞i)OutIndeterminate⁡\operatorname{Indeterminate}
live ↗
Inℜ(∞~)\Re(\tilde∞)OutIndeterminate⁡\operatorname{Indeterminate}
live ↗
InPiecewiseExpand(Re(ix),−2<x<2)\mathrm{PiecewiseExpand}(\mathrm{Re}(i x), -2\lt x\lt2)Outℜ(ix)\Re(i x)
live ↗
InSimplify(Re(x),x>0)\mathrm{Simplify}(\mathrm{Re}(x), x\gt0)Outℜ(x)\Re(x)

A Gaussian integer is a complex number with integer parts: (2+i)(1+3i)=−1+7i(2+i)(1+3i)=-1+7i

live ↗
InRe((2+i)(1+3i))\mathrm{Re}((2+i)(1+3i))Out−1-1
Properties #

Re of a symbolic value stays unevaluated

live ↗
InRe(x)\mathrm{Re}(x)Outℜ(x)\Re(x)

A real number is its own real part

live ↗
Inℜ(1)\Re(1)Out11

Known value · Wolfram MathematicalFunctionData, Re

Negative reals are unchanged

live ↗
Inℜ(−1)\Re(-1)Out−1-1

Known value · Wolfram MathematicalFunctionData, Re

Likewise for −i-i

live ↗
Inℜ(−i)\Re(-i)Out00

Known value · Wolfram MathematicalFunctionData, Re

Only the real part of 1+i1+i remains

live ↗
Inℜ(1+i)\Re(1+i)Out11

Known value · Wolfram MathematicalFunctionData, Re

The sign of the real part is kept: −1-1

live ↗
Inℜ(−1+i)\Re(-1+i)Out−1-1

Known value · Wolfram MathematicalFunctionData, Re

Both imaginary signs give −1-1 here

live ↗
Inℜ(−1−i)\Re(-1-i)Out−1-1

Known value · Wolfram MathematicalFunctionData, Re

Flipping the imaginary sign leaves the real part alone

live ↗
Inℜ(1−i)\Re(1-i)Out11

Known value · Wolfram MathematicalFunctionData, Re

The imaginary 3i\sqrt3 i drops out, leaving 1

live ↗
Inℜ(1+3i)\Re(1+\sqrt{3}i)Out11

Known value · Wolfram MathematicalFunctionData, Re

Real part −1-1 from −1+3i-1+\sqrt3 i

live ↗
Inℜ(3i−1)\Re(\sqrt{3}i-1)Out−1-1

Known value · Wolfram MathematicalFunctionData, Re

live ↗
In[ℜ(xe(1/5)iπ),ℜ(2x+i)]\bigl\lbrack\Re(xe^{(1/5)i π}), \Re(2x+i)\bigr\rbrackOut[ℜ(x×(14+54+21/24i5−51/2)),ℜ(2x+i)]\bigl\lbrack\Re(x×(\frac{1}{4}+\frac{\sqrt{5}}{4}+\frac{2^{1/2}}{4}i\sqrt{5-5^{1/2}})), \Re(2x+i)\bigr\rbrack

The imaginary part does not affect −3-\sqrt3

live ↗
Inℜ(−i−3)\Re(-i-\sqrt{3})Out−3-\sqrt{3}

Known value · Wolfram MathematicalFunctionData, Re

Real part of a point at angle 240∘240^\circ is −1-1

live ↗
Inℜ(−3i−1)\Re(-\sqrt{3}i-1)Out−1-1

Known value · Wolfram MathematicalFunctionData, Re

A point at angle −60∘-60^\circ has real part 1

live ↗
Inℜ(1−3i)\Re(1-\sqrt{3}i)Out11

Known value · Wolfram MathematicalFunctionData, Re

Real part 3\sqrt3 from 3−i\sqrt3 - i

live ↗
Inℜ(3−i)\Re(\sqrt{3}-i)Out3\sqrt{3}

Known value · Wolfram MathematicalFunctionData, Re

A real integer is returned as is

live ↗
Inℜ(2)\Re(2)Out22

Known value · Wolfram MathematicalFunctionData, Re

live ↗
Inℜ(i)\Re(i)Out00

Known value · Wolfram MathematicalFunctionData, Re

live ↗
Inℜ(3+i)\Re(\sqrt{3}+i)Out3\sqrt{3}

Known value · Wolfram MathematicalFunctionData, Re

live ↗
Inℜ(i−3)\Re(i-\sqrt{3})Out−3-\sqrt{3}

Known value · Wolfram MathematicalFunctionData, Re

About
Examples35
Checked againstWolfram Language 31 agree4 differSageMath 30 agree1 differ1 unevaluated1 errorSymPy 31 agree1 differ1 unevaluatedmpmath 29 agreeJulia 23 agree2 error
CrosswalkFungrimWolfram LanguageSageMathSymPympmath

Implementation

mappedsympypackages/oracle/src/mappings.ts
mappedmpmathpackages/oracle/src/mappings.ts
mappedsagepackages/oracle/src/mappings.ts

See also: Imaginary, Conjugate, Argument