Complex
複素数に使われる頭部である.
例題
すべて開く すべて閉じる例 (1)
スコープ (9)
4 I実部がないにもかかわらず,この数は頭部(Head)としてComplexを持つ:
Head[%]複素数x+Iy の完全形(FullForm)はComplex[x,y]である:
FullForm[1 + 2 I]FullFormを使って複素数を入力する:
Complex[2, 1]虚部が厳密に零の場合,結果はComplexではない:
Complex[2, 0]Head[%]複素(Complex)数の部分抽出にはReおよびImを使う必要がある:
x = 1 + 2 I;{Re[x], Im[x]}Partではうまくいかない:
x[[1]]複素数のどちらかの部分が機械精度の場合は,数全体が機械精度になる:
2. + I1 + 2.IMachineNumberQ[%]x = 2`20 + II xx ^ 21`20 + 2`30 IPrecision[%]_Complexを使ってパターンにおける複素数を表すことができる:
MatchQ[1 + 2 I, _Complex]rule = x_Complex -> Im[x] + I Re[x];f[1 + 2 I, 3 + 4 I, 5] /. rulef[1 + 2 I, 3 + 4 I, 5] /. Complex[r_, i_] :> Complex[i, r]アプリケーション (2)
cosine[x_Complex] := Cos[Re[x]]Cosh[Im[x]] - I Sin[Re[x]]Sinh[Im[x]]cosine[x_Real] := Cos[x]Plot3D[Abs[cosine[x + I y]], {x, -3, 3}, {y, -1, 1}]{(1 + (I x) / Y), (1 - (I x) / Y), 2 I x} /. Complex[0, y_] -> a y IIa Iのような単純な置き換えはI===Complex[0,1]のところしか乗算しない点に注意のこと:
{(1 + (I x) / Y), (1 - (I x) / Y), 2 I x} /. I -> a I特性と関係 (5)
1 + 2 INumberQ[%]AtomQ[1 + 2 I]Complexesを使って領域条件についての仮定を示す:
Reduce[z Conjugate[z] < 1, z, Complexes]3.64`10 + I% ^ 4しかし,それでも,実部と虚部が異なる精度である点には注意が必要である:
Precision /@ ReIm[%]Precision[%%]N[ISqrt[5]]N[ISqrt[5], 10]考えられる問題 (2)
x+Iy の形で入力された数は評価に際してのみ複素(Complex)数となる:
SetAttributes[f, HoldAll];
f[x_Complex] := Re[x] - Im[x]f[1 + 2 I]f[Evaluate[1 + 2 I]]FullForm[HoldForm[1 + 2 I]]評価された複素数は原子オブジェクトで明示的にはIを含まない:
FullForm[2 + I]MatchQ[2 + I, _ + I]Position[{2 + I, 1 + 2I}, I]Complex[x_,y_]の形式のパターンを使って複素数全体をマッチすることができる:
MatchQ[2 + I, Complex[_, 1]]Position[{2 + I, 1 + 2I}, Complex[_, 1]]テクニカルノート
-
▪
- 数の型
関連するガイド
-
▪
- 複素数 ▪
- WDF(Wolfram Data Framework) ▪
- 式の原子要素 ▪
- 数の表現
履歴
1988 で導入 (1.0)
テキスト
Wolfram Research (1988), Complex, Wolfram言語関数, https://reference.wolfram.com/language/ref/Complex.html.
CMS
Wolfram Language. 1988. "Complex." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Complex.html.
APA
Wolfram Language. (1988). Complex. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Complex.html
BibTeX
@misc{reference.wolfram_2026_complex, author="Wolfram Research", title="{Complex}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Complex.html}", note=[Accessed: 10-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_complex, organization={Wolfram Research}, title={Complex}, year={1988}, url={https://reference.wolfram.com/language/ref/Complex.html}, note=[Accessed: 10-September-2026]}