ROTG[a,b,c,s]
computes a Givens rotation {c,s} for given scalars a and b.
ROTG
ROTG[a,b,c,s]
computes a Givens rotation {c,s} for given scalars a and b.
詳細とオプション
- To use ROTG, you first need to load the BLAS Package using Needs["LinearAlgebra`BLAS`"].
- The following arguments must be given:
-
a input/output symbol scalar; the symbol value is modified in place b input/output symbol scalar; the symbol value is modified in place c output symbol scalar; the symbol value is modified in place s output symbol scalar; the symbol value is modified in place - ROTG[a,b,c,s] computes {c,s} such that {{c,s},{-Conjugate[s],c}.{a,b}=={r,0}, where the signed radius r is given by rSign[b]Norm[{a,b}] if a==0 or a,b∈ with Abs[a]≤Abs[b], and by rSign[a]Norm[{a,b}] otherwise. In the degenerate case a==b==0, by convention c==1 and s==0.
- The scalars c and s can be viewed as the cosine and sine, respectively, of the angle of rotation and satisfy the conditions c∈ and c2+Abs[s]21.
- The scalar a is set to r. The scalar b is not modified if either a or b is complex. Otherwise, b is set to the value z given by:
-
s if Abs[a]>Abs[b] 1/c if 0<Abs[a]≤Abs[b] 1 if 0==Abs[a]<Abs[b] 0 if 0==Abs[a]==Abs[b] - When given, the value z can be used to reconstruct c and s as follows:
-
c1/z s

if Abs[z]>1 c0 s1 if z1 c 
sz if 0<Abs[z]<1 c1 s0 if z==0
例題
すべて開く すべて閉じる例 (1)
Scope (3)
{a, b} = {a0, b0} = {2.3, -4.1};
ROTG[a, b, c, s];
{c, s}a == Sign[b0]Norm[{a0, b0}]{a, b} = {a0, b0} = {-2. + 3.I, -2 I};
ROTG[a, b, c, s];
{c, s}a == Sign[a0]Norm[{a0, b0}]Note that c is real-valued even when the inputs are complex:
Im[c]{a, b} = {a0, b0} = {2`20 / 3, -4`20 / 5};
ROTG[a, b, c, s];
{c, s}a == Sign[b0]Norm[{a0, b0}]Properties & Relations (1)
ROTG[a,b,c,s] satisfies the relation {{c,s},{-Conjugate[s],c}}.{a,b}={r,0} where r is the number saved in a:
{a, b} = {a0, b0} = RandomComplex[{-1 - I, 1 + I}, {2}];
ROTG[a, b, c, s];
Chop[{{c, s}, {-Conjugate[s], c}}.{a0, b0}] == {a, 0}The scalars c and s form a unit vector with c real:
c ^ 2 + Abs[s] ^ 2 == 1Possible Issues (2)
All arguments must be symbols:
ROTG[1, 2, 3, 4]ROTG[a, b, 3, 4]The first and the second arguments are modified and must be initialized to scalars:
Clear[a, b];
ROTG[a, b, c, s]{a, b} = {1, 3};
ROTG[a, b, c, s];
{a, b, c, s}関連するガイド
テキスト
Wolfram Research (2017), ROTG, Wolfram言語関数, https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html.
CMS
Wolfram Language. 2017. "ROTG." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html.
APA
Wolfram Language. (2017). ROTG. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html
BibTeX
@misc{reference.wolfram_2026_rotg, author="Wolfram Research", title="{ROTG}", year="2017", howpublished="\url{https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html}", note=[Accessed: 08-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_rotg, organization={Wolfram Research}, title={ROTG}, year={2017}, url={https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/ROTG.html}, note=[Accessed: 08-August-2026]}