---
title: Direct Givens Rotation (DGR)
url: https://www.emergentmind.com/topics/direct-givens-rotation-dgr
type: topic
---

# Direct Givens Rotation (DGR)

Direct Givens Rotation (DGR) denotes a family of constructions in which an orthogonal or unitary transformation is computed, parameterized, or applied directly through Givens rotations, i.e., transformations that act nontrivially on a two-dimensional coordinate plane and leave all other coordinates unchanged. In numerical linear algebra, DGR commonly refers to direct computation of the rotation coefficients that annihilate one component of a vector; in optimization and learning, it refers to representing an orthogonal map as an explicit product of plane rotations and optimizing the corresponding angles; in quantum and scientific computing, closely related constructions appear as fixed Givens-exchange circuits, adjacent-level qudit compilers, and factorized elimination schemes. The term is not fully standardized across the literature: some papers use “Direct Givens Rotation” explicitly, whereas others present closely corresponding methods under different names [2508.11822][2508.19431][2404.04316].

## 1. Terminology and scope

The literature uses “Direct Givens Rotation” in more than one technical sense. In the narrowest sense, it means computing the actual rotation coefficients \(c\) and \(s\) for
\[
G=\begin{bmatrix} c & s \\ -s & c \end{bmatrix},
\qquad
G\begin{bmatrix} a \\ b \end{bmatrix}
=
\begin{bmatrix} r \\ 0 \end{bmatrix},
\]
without indirect modified representations. In a broader sense, it means parameterizing an orthogonal transformation itself as a product of Givens factors and optimizing those factors directly, rather than passing through a dense skew-symmetric parameter, an SVD, a Cayley transform, or per-factor numerical compilation [2508.19431][2404.04316][2203.05082].

| Domain | Direct Givens object | Characteristic use |
|---|---|---|
| Numerical linear algebra | \(c,s\) for a single \(2\times2\) rotation | Zeroing one component or one matrix entry |
| Orthogonal optimization | \(\prod_k G(i_k,j_k;\theta_k)\) | Learn or optimize an orthogonal matrix directly |
| Quantum circuits | Two-mode or adjacent-level Givens blocks | Variational ansatz or direct compilation |
| Sparse/factorized systems | Sequences or equivalents of plane rotations | QR updates, sparse factorization, join-aware elimination |

This multiplicity of meanings is explicit in recent work. The low-rank APG paper uses “direct Givens rotation” for orbital optimization via a product of Givens matrices [2508.11822]. The square-root-free real-rotation paper uses “direct” to distinguish computation of the actual rotation parameters from older square-root-free methods that do not construct the actual rotation [2508.19431]. Other papers describe nearly the same idea without the acronym, for example “Givens Coordinate Descent,” “Givens-rotation-based QR,” “Givens-exchange ansatz,” or direct SNAP–displacement realization of adjacent Givens factors [2203.05082][2606.26912][2307.11900].

## 2. Classical numerical formulation

In the classical real case, the direct Givens problem is to construct
\[
G=
\begin{bmatrix}
c & s\\
-s & c
\end{bmatrix},
\qquad c^2+s^2=1,
\]
so that
\[
G\begin{bmatrix} a\\ b\end{bmatrix}
=
\begin{bmatrix} r\\ 0\end{bmatrix}.
\]
The standard textbook formulas are
\[
r=\sqrt{a^2+b^2},\qquad c=\frac{a}{r},\qquad s=\frac{b}{r},
\]
and appear explicitly in Givens-rotation-based QR implementations that compute the coefficients from the two active entries and immediately apply the row rotation to the trailing columns [1805.07490].

A substantial recent numerical strand concerns computing \(c\) and \(s\) more directly, more accurately, or without square roots. One square-root-free algorithm constructs a real Givens rotation by approximating
\[
p(t)=1+\frac{1}{\sqrt{1+t^2}},
\]
with \(t=g/f\) or \(t=f/g\), then renormalizes the preliminary \((\bar c,\bar s)\) by a second-order correction based on
\[
x=1-\bar c^2-\bar s^2,\qquad
d=x\left(\frac12+\frac38 x\right),
\]
and returns
\[
(c,s)=(d\bar c+\bar c,\; d\bar s+\bar s).
\]
Its reported simulations on \(10^9\) random inputs showed higher average accuracy than a standard square-root-based branchwise algorithm; for Float64, the square-root-free method matched the rounded high-precision baseline in zero ulp \(82.6\%\) of cases versus \(57.6\%\) for the reference implementation [2508.19431].

A second line uses compensated arithmetic. One 2024 algorithm starts from the naive rotation computed with `hypot`, then builds a correction from the residuals
\[
E_{\text{norm}}=\frac{1-c^2-s^2}{2},
\qquad
E_{\text{orth}}=\frac{cg-sf}{r},
\]
and applies
\[
\delta c=cE_{\text{norm}}-sE_{\text{orth}},
\qquad
\delta s=sE_{\text{norm}}+cE_{\text{orth}},
\]
followed by \(c\leftarrow c+\delta c\), \(s\leftarrow s+\delta s\). The residuals are evaluated with `fma`-based error-free products or Dekker splitting, and the paper reports “perfect observed accuracy” for all three tested `hypot` variants in its large random experiment [2406.02750]. A related compensated construction computes an accurate reciprocal hypotenuse
\[
\rho\approx \frac{1}{\sqrt{f^2+g^2}}
\]
from FMA-based residuals and then forms \(c\approx f\rho\), \(s\approx g\rho\); in a \(10^9\)-sample experiment, the compensated method produced zero-ulp cosine and sine outputs in \(100\%\) of reported cases, versus about \(66.56\%\) for the naive method [2103.08694].

Direct generation of \(2\times 2\) unitary Givens matrices has also been analyzed from the perspective of per-entry error accumulation. A 2022 study compared LAPACK 3.9, LAPACK 3.10, and a new direct construction strategy, arguing that fewer operations contributing to each output entry can yield better average accuracy even when total operation count is larger. Its experiments showed improved average singular-value and backward-error behavior, particularly under repeated application of rotations [2211.04010].

## 3. Direct parameterization of orthogonal transformations

In machine learning and variational many-body methods, DGR often means that the orthogonal map itself is parameterized as a product of Givens factors and trained through those factors. The clearest recent example is orthogonal fine-tuning of pretrained models. There, a frozen weight matrix \(W\) is adapted multiplicatively as
\[
W_* = RW,
\]
with the forward map changing from \(h=W^\top x\) to \(h=(RW)^\top x\). Original OFT parameterized \(R\) through a dense skew-symmetric matrix \(Q\) and the Cayley transform
\[
R=(I+Q)(I-Q)^{-1},
\]
which is effectively \(\mathcal O(d^2)\) in parameters per transformed \(d\)-dimensional layer. GOFT replaces this with a direct Givens product
\[
R=\prod_{k=1}^{d-1} G(k-1,k;\theta_k),
\]
or, in the parallel form used for efficient depth reduction,
\[
R=\prod_{r=1}^{\log d} P_r,
\qquad
P_r=\prod_{k=0}^{(d/2^r)-1} G\!\left(2^r k,\ 2^{r-1}(2k+1);\ \theta_k^r\right).
\]
Since \(\sum_{r=1}^{\log d} d/2^r=d-1\), the total parameter count becomes \(\mathcal O(d)\). The relaxed variant qGOFT replaces each \(2\times2\) rotation block by a learned matrix
\[
\tilde G_i=
\begin{bmatrix}
\alpha_{1i} & \beta_{1i}\\
\alpha_{2i} & \beta_{2i}
\end{bmatrix},
\]
and regularizes soft orthogonality via
\[
\sum_i \langle \alpha_i,\beta_i\rangle^2.
\]
Experimentally, on GLUE with DeBERTaV3-base, GOFT used \(0.08\)M trainable parameters versus \(0.66\)M for \(\mathrm{OFT}_{b=8}\) while achieving the same average score \(88.78\); qGOFT with \(0.33\)M reached \(89.35\) [2404.04316].

The same direct-angle philosophy appears in low-rank antisymmetric product of geminals. There the orbital/unitary part of the wavefunction, previously parameterized as \(U=\exp(X)\) with an antisymmetric \(X\) and optimized by numerical differentiation, is reformulated as
\[
U=\prod_{P,Q} G(P,Q).
\]
The rotation angles \(\theta_{PQ}\) become the variational parameters, and the gradient is computed analytically by an error-back-propagation-like formula over the ordered Givens chain. The update is global:
\[
\Theta^{(n+1)}=\Theta^{(n)}-\alpha\left(\tilde H^{(n)}\right)^{-1} g^{(n)}.
\]
In the reported H\(_2\)O rank-2 APG example, runtime fell from more than one week to less than \(10\) minutes after switching to the DGR formulation [2508.11822].

These formulations share a common feature: orthogonality is enforced by construction at the local \(2\times2\) level, and the trainable variables are the plane-rotation parameters themselves rather than a dense unconstrained surrogate.

## 4. Optimization over \(O(d)\) and \(SO(n)\) by Givens coordinates

A distinct research line treats Givens factors as coordinates on the orthogonal group and builds optimization algorithms around single-plane or block-plane updates. In one formulation, optimizing \(f(U)\) over
\[
O(d)=\{U\in\mathbb R^{d\times d}: UU^\top=I\}
\]
is approached by Riemannian coordinate descent: choose a pair \((i,j)\), solve the one-dimensional subproblem
\[
\theta^*=\arg\min_\theta f\bigl(U\,G(i,j,\theta)\bigr),
\]
and update
\[
U\leftarrow U\,G(i,j,\theta^*).
\]
The method preserves orthogonality exactly at every step and interprets a single Givens factor as the manifold analogue of one Euclidean coordinate update. Under differentiability and Lipschitz assumptions on directional derivatives, the paper proves convergence to critical points and gives an \(O(1/T)\) expected stationarity rate; it also reports practical effectiveness for sparse PCA and orthogonal tensor decomposition [1312.0624].

For trainable embedding indexes, Givens Coordinate Descent (GCD) uses the special orthogonal group \(SO(n)\) more explicitly. A learned rotation \(R\) appears in
\[
T(X)=\phi(XR)R^\top,
\]
with loss
\[
L(X)=L_{ret}(T(X))+\frac1m\|XR-\phi(XR)\|^2.
\]
Rather than recomputing \(R\) by SVD or maintaining it through a Cayley transform, GCD forms the skew score matrix
\[
A=G^\top R-R^\top G,
\qquad G=\nabla_R L(XR),
\]
selects \(n/2\) disjoint coordinate pairs, and updates
\[
R \leftarrow R\prod_{\ell=1}^{n/2} R_{i_\ell,j_\ell}\!\bigl(-\lambda g_{i_\ell,j_\ell}\bigr).
\]
The random variant GCD-R has a sublinear convergence guarantee on geodesically convex objectives, while the greedy and steepest variants dominate it empirically; the paper also argues that the block-disjoint structure is substantially more parallelizable than SVD-based rotation learning [2203.05082].

Approximation-oriented work pushes the idea further. One paper approximates an orthogonal matrix by a product of “extended orthogonal Givens transformations”
\[
\bar U=\prod_{k=1}^g G_{i_kj_k},
\]
where each local \(2\times2\) block is either a standard Givens rotation
\[
\begin{bmatrix} c & -s\\ s & c \end{bmatrix}
\]
or a sparse reflector
\[
\begin{bmatrix} c & s\\ s & -c \end{bmatrix},
\qquad c^2+s^2=1.
\]
The local update is chosen in closed form from a \(2\times2\) SVD, and each factor costs 6 arithmetic operations to apply; the method is used to build fast approximate PCA transforms [1907.08697]. Another paper studies “effective Givens factorization” through manifold coordinate descent on
\[
f(U)=d^{-1}\|U\|_1,
\]
which drives \(U\) toward a signed permutation while accumulating the Givens factors. It combines constructive approximation results with a negative theorem showing that generic unitary matrices are not effectively approximable by only \(o(d^2/\log d)\) Givens factors [1905.05796].

## 5. Quantum and wavefunction applications

Quantum computing and computational chemistry use DGR-like constructions in two main ways: as variational ansatz layers and as direct hardware-oriented compilation primitives.

For molecular variational eigensolvers, a fixed-topology Givens-exchange ansatz uses a two-qubit macro
\[
G_{ij}(\beta)|01\rangle=\cos\beta\,|01\rangle-\sin\beta\,|10\rangle,
\qquad
G_{ij}(\beta)|10\rangle=\sin\beta\,|01\rangle+\cos\beta\,|10\rangle,
\]
while leaving \(|00\rangle\) and \(|11\rangle\) invariant. The full ansatz is
\[
|\psi(\theta)\rangle
=
R_L G_{L-1} R_{L-1}\cdots G_1 R_1 G_0 R_0 |b_0\rangle,
\]
and the reported experiments use \(L=2\), hence
\[
|\psi(\theta)\rangle = R_2 G_1 R_1 G_0 R_0 |b_0\rangle.
\]
Across six fixed seeds, the reported mean errors were \(0.000000124\) Hartree for LiH-6, \(0.000128558\) Hartree for H\(_2\)O-8, and \(0.000002152\) Hartree for the BeH\(_2\)-6 candidate, all below chemical accuracy \(1.60\,\mathrm{mHa}\). The paper is explicit, however, that the full circuit is not globally particle-number conserving because the \(R_Y\) layers can change Hamming weight [2606.26912].

In qudit compilation, a target adjacent-level Givens rotation on \(\{|k\rangle,|k+1\rangle\}\),
\[
G(\theta)=
\begin{bmatrix}
\cos\theta & -\sin\theta\\
\sin\theta & \cos\theta
\end{bmatrix},
\]
is approximated by the fixed SNAP–displacement block
\[
V_k(\alpha)=D(\alpha)R_\pi(k)D(-2\alpha)R_\pi(k)D(\alpha),
\]
with direct parameter map
\[
\alpha=\Phi(\theta)=\frac{\theta}{4\sqrt{k+1}}.
\]
This removes the need for per-rotation numerical optimization at compile time. The paper reports empirical single-step infidelity scaling approximately as \(\mathcal O(\theta^6)\), and for segmented full-circuit compilation approximately as \(\mathcal O(m^{-4})\), with total arithmetic complexity \(\mathcal O(d^3)\) for compiling an arbitrary \(d\)-dimensional unitary into adjacent Givens factors plus SNAP gates [2307.11900].

These works use different physical objects than classical real Givens rotations, but the structural theme is the same: explicit two-mode or adjacent-level rotations are treated as the primary degrees of freedom rather than as hidden subroutines inside a denser parametrization.

## 6. Structured large-scale computation and systems

Direct Givens constructions also appear in system-oriented algorithms where the key advantage is locality of update. In spatial QR decomposition, the classical formula
\[
c=\frac{x}{\sqrt{x^2+y^2}},
\qquad
s=\frac{y}{\sqrt{x^2+y^2}}
\]
is used directly inside a Givens-rotation-based QR algorithm, with one function computing \((c,s)\) and the pivot-column update, and another applying the same rotation to trailing entries of the two affected rows. The paper’s contribution is to map this irregular dependence structure into a spatial T2S program with separate \(X\) and \(Y\) processing elements, not to alter the direct computation itself [1805.07490].

For all-subset regression in Gaussian-network learning, the central primitive is a QR-decomposition traversal by adjacent column swaps followed by Givens retriangularization. Starting from an existing upper-triangular \(R\), one swaps adjacent columns and then applies a single Givens rotation \(G_\theta^{(i,i+1)}\) to restore triangular form. The paper names this combined update a GRC operation and proves that its greedy traversal covers all family regressions with the minimum number \(2^m-m-1\) of such updates [1901.07643].

In Gaussian Markov random fields, incomplete orthogonal factorization by Givens rotations is used to construct a sparse approximate Cholesky factor. With
\[
A=
\begin{pmatrix}
L_1^\top\\
L_2^\top
\end{pmatrix},
\qquad
A^\top A=Q_1+Q_2,
\]
successive Givens eliminations and threshold dropping produce an upper-triangular \(R\) such that
\[
\widetilde Q=R^\top R
\]
approximates the target precision matrix. The method is slower than standard Cholesky in optimized libraries, but it is described as stable, robust, and often sparser, especially when conditioning leads naturally to rectangular stacked systems [1307.1368].

A more radical factorization appears in QR over database joins. Figaro proves that its head-and-tail computations are equivalent to a long sequence of Givens rotations on the materialized join output, but it pushes those effects through the join factorization and avoids materializing the join. For a Cartesian-product block \(A=S\times T\), the sequence
\[
G=R_m\cdots R_2
\]
with
\[
R_i=\mathrm{Giv}_m\!\left(1,i,\,-\frac{1}{\sqrt i},\,\frac{\sqrt{i-1}}{\sqrt i}\right)
\]
produces a head row and tail rows exactly described by the operators \(\mathcal H(A)\) and \(\mathcal T(A)\). The full method computes an almost upper-triangular \(R_0\) in \(O(MN)\) time for acyclic joins, where \(M\) is input size and \(N\) is the number of data columns, and then post-processes to the final \(R\) [2204.00525].

## 7. Limits, caveats, and recurring misconceptions

The first caveat is terminological. DGR does not denote a single universally fixed algorithm. It may mean direct coefficient construction for one \(2\times2\) rotation, direct parameterization of an orthogonal matrix as a product of Givens factors, or a physically motivated two-mode rotation ansatz. Treating these as identical obscures important differences in objectives, guarantees, and computational costs.

A second caveat concerns “expressiveness” claims. In Givens-based orthogonal fine-tuning, the theorem proved is that for any \(\mathbf x\in\mathbb R^d\) and any \(\mathbf y\) of the same norm, there exist \(d-1\) Givens rotations mapping \(\mathbf x\) to \(\mathbf y\). The paper then interprets this operationally as equivalent expressiveness for the rotations relevant to fine-tuning. This is narrower than a global parameterization theorem for all of \(SO(d)\), whose dimension is \(d(d-1)/2\) [2404.04316].

A third caveat is computational. Direct angle parameterizations can reduce parameter count while increasing training cost. In the QNLI timing appendix for GOFT/qGOFT, per-batch time is \(1.80\)s for OFT, \(6.00\)s for GOFT, and \(6.27\)s for qGOFT, so the advantage is primarily parameter efficiency and mergeable inference rather than raw training speed [2404.04316]. Numerical direct-construction methods also retain hardware assumptions: the square-root-free and compensated algorithms are especially motivated by machines with fast FMA and slower square root, and some still require rescaling logic for extreme inputs [2508.19431][2103.08694].

A fourth caveat is structural. Effective approximation by a small number of Givens factors is strongly target-dependent. The negative theorem for effective Givens factorization shows that if
\[
N=o\!\left(\frac{d^2}{\log d}\right),
\]
then, as \(d\to\infty\), the Haar measure of unitary matrices approximable within fixed error by \(N\) Givens factors tends to zero. This strongly suggests that low-factor DGR is inherently most useful for structured transforms, learned operators with special geometry, or applications where approximation rather than exact representation is the objective [1905.05796].

Finally, in quantum settings, “Givens” can be physically suggestive without implying a strict fermionic or hardware-native interpretation. The molecular Givens-exchange ansatz preserves excitation number only within the local \(\{|01\rangle,|10\rangle\}\) subspace of the exchange block, while the full circuit does not preserve particle number because of the interleaved \(R_Y\) layers [2606.26912]. Similarly, the SNAP–displacement compiler gives an analytically mapped adjacent-level approximation, not an exact finite-depth identity between a Givens rotation and a fixed short gate block [2307.11900].

Taken together, these strands show that Direct Givens Rotation is best understood as a unifying methodological pattern rather than a single algorithmic artifact: orthogonal structure is enforced or approximated through explicit two-dimensional rotations, and the computational question becomes how those local rotations are chosen, represented, and composed in a given domain.

Source: https://www.emergentmind.com/topics/direct-givens-rotation-dgr