Next Article in Journal
Videogame Programming & Education: Enhancing Programming Skills Through Unity Visual Scripting
Previous Article in Journal
A Business-Oriented Approach to Automated Threat Analysis for Large-Scale Infrastructure Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fast Computation for Square Matrix Factorization

by
Artyom M. Grigoryan
Department of Electrical and Computer Engineering, The University of Texas at San Antonio, San Antonio, TX 78249, USA
Computers 2026, 15(1), 67; https://doi.org/10.3390/computers15010067
Submission received: 12 December 2025 / Revised: 13 January 2026 / Accepted: 15 January 2026 / Published: 17 January 2026

Abstract

In this work, we discuss a method for the QR-factorization of N × N matrices where N 3 which is based on transformations which are called discrete signal-induced heap transformations (DsiHTs). These transformations are generated by given signals and can be composed by elementary rotations. The data processing order, or the path of the transformations, is an important characteristic of it, and the correct choice of such paths can lead to a significant reduction in the operation when calculating the factorization for large matrices. Such paths are called fast paths of the N -point DsiHTs, and they define sparse matrices with more zero coefficients than when calculating QR-factorization in the traditional path, that is, when processing data in the natural order x 0 , x 1 , x 2 , . For example, in the first stage of the factorization of a 512 × 512 matrix, a matrix is used with 257,024 zero coefficients out of a total of 262,144 coefficients when using the fast paths. For comparison, the calculations in the natural order require a 512 × 512 matrix with only 130,305 zero coefficients at this stage. The Householder reflection matrix has no zero coefficients. The number of multiplication operations for the QR-factorization by the fast DsiHTs is more than 40 times smaller than when using the Householder reflections and 20 times smaller when using DsiHTs with the natural paths. Examples with the 4 × 4, 5 × 5, and 8 × 8 matrices are described in detail. The concept of complex DsiHT with fast paths is also described and applied in the QR-factorization of complex square matrices. An example of the QR-factorization of a 256 × 256 complex matrix is also described and compared with the method of Householder reflections which is used in programming language MATLAB R2024b.

1. Introduction

The factorization of a matrix A by an orthogonal (or unitary) matrix Q and a triangular matrix R , which is known as QR-factorization, or QR-decomposition, is a fundamental technique which is widely used in various applications in computing and data analysis. This factorization is computationally effective in solving a large linear system A x = y (as x = A 1 y ), in solving least-squares problems [1,2,3,4,5,6], in signal and image processing [7,8], in image watermarking [9,10], in improving air traffic control radar [11], in analyzing the stability of linear systems in control theory [12,13], in solving linear regression problems in machine learning [14,15], in linear programming algorithms [16], in processing massive datasets in parallel across a cluster of computers (tall-and-skinny matrix QR-factorizations) [17,18,19], and in building effective methods for calculating multi-qubit operations in quantum computing [20,21,22,23]. The matrix A is presented as the product of two matrices, A = Q R . The inverse matrix A 1 is calculated as A 1 = R 1 Q 1 = R 1 Q * . Here, Q * is the conjugate transpose to Q , and the inverse matrix R 1 can be easily calculated, by using an iterative process called back substitution. QR-factorization is a well-known method in linear algebra, but questions remain regarding the most efficient way to implement it for big data in computing.
Many methods of QR-factorization were introduced for real matrices A , and then were modified for complex matrices. We mention the Gram–Schmidt process [24,25,26], the method of Householder reflections (or Householder transformations) [27,28,29,30], and Givens rotations [31,32,33,34]. We consider the QR-factorization with an upper triangular matrix R and will dwell on the factorization which is calculated by the discrete signal-induced heap transformations (DsiHTs) [35]. For a real matrix, the DsiHT can be composed by the elementary rotations. Together with these 2 × 2 basic operations, the DsiHT is determined by the path, or order, of the processing the signal components. A description of these transformations for two particular cases relating to DsiHT with weak and strong two-wheel carriages is given in [35,36]. These DsiHTs are called weak and strong DsiHTs, respectively. The first transformation operates on the signal x = ( x 0 , x 1 , x 2 , ,   x N 1 ) in the usual way, that is, the 2 × 2 rotations operate in the following order: x 0 and x 1 , then the renewed x 0 and x 2 , and so on. The strong DsiHT processes the signal components in the following order: x N 2 and x N 1 , then x N 3 with the renewed x N 2 , and, continuing in this manner, all the signal generator energy is transferred to the first component of the transform. Every second output of the rotations is zeroed.
The present work is a continuation of the research on the QR-factorization of square matrices. From the very beginning of our work in QR-factorization, we have paid great attention to the path of the N -point DsiHT, especially for a large N . Many paths can be chosen for the transformation and, among them, we are looking for paths which lead to effective calculation of the DsiHT-based QR-factorization. Each path of the transformation determines the structure of its matrix and the number of zero coefficients in it. Therefore, we are looking for paths that determine sparse matrices of the transformation. Such paths exist and they can be used instead of the paths in the above-mentioned weak and strong DsiHTs. We present two such paths, which are called fast paths #3 and #4. The paths for the weak and strong DsiHTs in [36] are referred to as paths #1 and #2, respectively. The DsiHTs with fast paths are defined by unitary matrices that are sparser than the matrices of the original two DsiHTs. For instance, the 256-point DsiHTs with the fast paths have 63,232 zero coefficients out of 65,536, whereas, when using path #1 or #2, the number of zero coefficients is 32,325. This means that fewer operations are required to perform the transformation H : x ( x , 0 , , 0 ) and, therefore, fewer operations are required to calculate the QR-factorization.
The main contributions of this work are the following:
  • Description of the fast paths for the N -point DsiHT with a sparse matrix. For instance, when N = 2 r ,   r > 2 , the matrix of the transformation has N 2 N ( log 2 N + 1 ) zero coefficients.
  • Fast paths #3 and #4 for QR-factorization of N × N matrices where N 3 .
  • The concept of DsiHT with new 2 × 2 complex matrices for ‘complex Givens rotations.’
  • A reduced number of multiplications in the QR-factorization.
  • Algorithms with fast paths that allow us to perform all real and complex rotations in the QR-factorization only on the adjacent bit planes.
  • Encoded tables with N N 1 / 2 angles for the real unitary matrix Q . Such tables can be used to generate random unitary N × N matrices.
  • Illustrative examples that show the advantage of using the DsiHT with fast paths when compared to the Householder reflection-based QR-factorization.
The rest of the paper is organized in the following way: In Section 2, the concept of the N -point DsiHT is described with examples of different paths for the N = 4 case. A comparison with the method of the Householder reflections is also given. Section 3 describes all N -point DsiHTs with fast paths for N 8 . The matrices of the eight-point DsiHTs with five different paths are given and compared with the eight-point Householder reflection. The algorithm for the N -point DsiHT with fast path #4 is also presented in the general case, where N 3 . In Section 4, the DsiHT-based QR-factorization is described with the example of a 5 × 5 real matrix. The concept of the complex DsiHT with the fast paths and different 2 × 2 basic operations is presented in Section 5. Examples with 5 × 5 and 256 × 256 complex matrices are described and compared with the Householder reflection-based QR-factorization calculated in MATLAB. In Appendix A, our main MATLAB-based codes for QR-factorization of real and complex square matrices are presented.

2. Discrete Signal-Induced Heap Transforms

In this section, we consider the N -point DsiHT for the case where N is equal to or differs from a power of 2. The transformation requires ( N 1 ) elementary rotations [35]. There are many ways to calculate the transform. As an example, we consider the four-point DsiHTs which are defined by the diagrams shown in Figure 1. The signal is considered real. These diagrams show different orders, or paths, for processing the components of the input. In part (a), the components x 0 , x 1 , x 2 , and x 3 of the input signal (generator) x are processed in the natural order. This is the traditional path for processing the signal. The DsiHT with such a path is called the weak-carriage-wheel DsiHT (see [36] for more detail). The first value of the transform is renewed three times. This is why it is denoted by x 0 ( 3 ) . Each two-point unitary transform T k ,   k { 1 , 2 , 3 } is the Givens rotation, or elementary rotation. In the figure, these rotations are depicted as butterflies. In the matrix form, the rotation T :   x , y ± x 2 + y 2 , 0 is described as
T x y = cos ϑ sin ϑ sin ϑ cos ϑ x y = ± x 2 + y 2 0 .
The rotation angle is defined by the inputs as ϑ = arctan y / x . If x = 0 , then ϑ = ± π / 2 . The transform of the generator x = ( x 0 , x 1 , x 2 , x 3 ) is equal to
T x = ± x , 0 , 0 , 0 = ± x 0 2 + x 1 2 + x 2 2 + x 3 2 , 0 , 0 , 0 .
Thus, the energy E x = x of the generator is transformed to the first component. The angles ϑ k , k = 0 , 1 , 2 , are calculated from this generator. The set A x = { ϑ 1 , ϑ 2 , ϑ 3 } is called the angular representation of the signal generator. Once the angles have been calculated, the transform of an input z = ( z 0 , z 1 ,   z 2 , z 3 ) is calculated by using the same path:
T 1 : z 0 , z 1 z 0 1 , z 1 , T 2 : z 0 1 , z 2 z 0 2 , z 2 , T 3 : z 0 2 , z 3 z 0 3 , z 3 .
The result of the transformation is the signal T z = z 0 3 , z 1 , z 2 , z 3 . The four-point DsiHT is a unitary transformation. Therefore, the energy of the signal is preserved, E z = z = T ( z ) .
Path #2, which is shown in the diagram in Figure 1b, corresponds to the DsiHT which is called the strong-carriage-wheel DsiHT [36]. Here, data processing begins with the last component x 3 of the signal. The first component x 0 is updated once at the end of the computation. Now, we consider two paths of the four-point DsiHT shown in Figure 1c,d. There are two different partitions of data in the first stage of computation. Two rotations T 1 and T 2 can be calculated in parallel. The total number of rotations, or butterflies, is equal to 3. We will call paths #3 and #4 of the calculation shown in Figure 1c and Figure 1d, respectively, the fast paths. Of greatest interest are these two paths, which allow the calculation of the transform to be performed in two stages (or the minimum number of stages). Here, we also mention the following: Methods for QR-factorization by rotations are widely used in quantum computation to build quantum circuits for multi-qubit operations and quantum states preparation. All computations in quantum computing are performed with gates (operations) which are described by unitary matrices. Implementation of these multi-qubit operations in quantum circuits can be fulfilled only on the adjacent bit planes (BPs). Such bit planes differ only in one bit. Therefore, it is especially important from the very beginning to have decompositions of all matrices by basic operations on such bit planes; otherwise, we need to add many permutations inside between the gates to put all operations on adjacent bit planes, and that makes the quantum circuit complex [37,38]. For example, with just six qubits, the number of controlled NOT gates exceeds 1020 (theoretically) and 1868 (in quantum Shannon decomposition), while the QsiHT-based method of QR-decomposition allows the quantum circuits for six-qubit operations to be built without permutations.
In the above case, when the signals are four-point vectors, we can consider that the components x 0 , x 1 ,   x 2 , and x 3 lie on the bit planes 0, 1, 2, and 3, that is, 00, 01, 10, and 11, respectively. Three butterflies in the diagrams with fast paths operate only on adjacent BPs. For instance, the second butterfly T 2 operates on BPs (10) and (11) when using path #3, and on BPs (01) and (11) when using path #4. For comparison, the butterfly T 3 in the diagram in part (a) operates on BPs (00) and (11), which are not adjacent BPs. Also, one can see that, in the diagram in part (b), the second rotation T 2 operates on non-adjacent BPs (01) and (10). In general, for any integer N > 2 , we call the path of the N -point DsiHT the fast path, if all butterflies (rotations) operate only on adjacent BPs.
Example 1.
Let the generator be  x = ( 1 , 3 , 2 , 5 )  with the energy  E x = 39 .  The matrices of the four-point DsiHTs generated by  x  and the four paths in Figure 1 are as follows:
H 4 ; # 1 = 0.1601 0.4804 0.3203 0.8006 0.9487 0.3162 0 0 0.1690 0.5071 0.8452 0 0.2140 0.6419 0.4280 0.5991 ,   det H 4 ; # 1 = 1 ,
H 4 ; # 2 = 0.1601 0.4804 0.3203 0.8006 0.9871 0.0779 0.0520 0.1299 0 0.8736 0.1807 0.4519 0 0 0.9285 0.3714 ,   det H 4 ; # 2 = 1 ,
H 4 ; # 3 = 0.1601 0.4804 0.3203 0.8006 0.9487 0.3162 0 0 0.2727 0.8181 0.1881 0.4702 0 0 0.9285 0.3714 ,   det H 4 ; # 3 = 1 ,
H 4 ; # 4 = 0.1601 0.4804 0.3203 0.8006 0.4176 0.1842 0.8351 0.3070 0.8944 0 0.4472 0 0 0.8575 0 0.5145 ,   det H 4 ; # 4 = 1 .
The transforms H 4 ; # k x = 39 , 0 , 0 , 0 for k = 1 : 4 . Each path determines the structure of the matrix. This can be easily seen by the location and the number of zero coefficients in the above matrices. The number of zero coefficients in the first two matrices is equal to 3, and, in the last two matrices, this number is 4. The first rows in these matrices are the generator x normalized to the coefficient of 0.1601 , that is, 1 , 3 , 2 , 5 × 0.1601 . All numbers are given with an accuracy of four decimal places. The angles ϑ k , k = 1 , 2 , 3 (in degrees) for these transformations are given in Table 1.
For comparison, we consider the Householder transformation matrix composed by the signal x as follows [4,28]:
P 4 = I 4 2 v v v = 0.1601 0.4804 0.3203 0.8006 0.4804 0.8011 0.1326 0.3315 0.3203 0.1326 0.9116 0.2210 0.8006 0.3315 0.2210 0.4475 ,   det P 4 = 1 ,
where I 4 is the 4 × 4 identity matrix and the Householder vector v is calculated as v = x + x 1 , 0 , 0 , 0 = 1 + 39 , 3 , 2 , 5 . This matrix is symmetric (without zero coefficients) and orthogonal, and P 4 x = ( 39 , 0 , 0 , 0 ) .
All these five matrices are different. As an example, we consider the input signal z = 1 , 3 , 2 , 5 . Then, we obtain the following five different transforms:
H 4 ; # 1 z = 2.081666 , 1.897367 , 0.338062 , 5.563486 ,
H 4 ; # 2 z = 2.081666 , 0.675382 , 4.518564 , 3.713907 ,
H 4 ; # 3 z = 2.081666 , 1.897367 , 4.156148 , 3.713907 ,  
H 4 ; # 4 z = 2.081666 , 2.235191 , 1.788854 , 5.144958 ,
P 4 z = 2.081666 , 4.276053 , 2.850702 , 2.873246 .  

3. N -Point DsiHT, When N 8

In this section, we describe N -point DsiHTs starting from the number N = 8 and reducing it to 3. For each of these transformations, we consider two fast paths, which are similar to the fast paths in Figure 1c,d. First, we consider the eight-point DsiHTs with paths given in Figure 2. Seven butterflies are used in each of the diagrams shown in Figure 2a,b, and all butterflies operate on adjacent BPs. Four butterflies are used in the first stage, and they can be calculated in parallel. Two butterflies operate in the second stage, and one butterfly in the last stage. It is difficult to say which of these two paths is better. One can note from the diagram in Figure 2b that the calculations after stage 1 represent the four-point DsiHT described in Figure 1d. Likewise, for path #3, the calculations of the butterflies T 5 ,   T 6 , and T 7 in the diagram in Figure 2a represent the four-point DsiHT of the updated input { x 0 1 , x 2 1 , x 4 1 , x 6 1 } .
The paths which are similar to the paths in Figure 1a,b can also be used for the eight-point DsiHT. It should be noted that other fast paths exist for calculating the eight-point DsiHT. As an example, we consider the transformation in the diagram shown in Figure 3. The larger the value of N , the more paths can be found for computing the N -point DsiHT.
Example 2.
Let the generator be  x = ( 1 , 3 , 2 , 4 , 2 , 1 , 3 , 5 )  with the energy  E x = 69 .  The matrices  H 8 ; # n n = 1 : 4  of the eight-point DsiHTs generated by  x  and paths #1, 2, 3, and 4 are as follows:
H 8 ; # 1 = 0.1204 0.3612 0.2408 0.4815 0.2408 0.1204 0.3612 0.6019 0.9487 0.3162 0 0 0 0 0 0 0.1690 0.5071 0.8452 0 0 0 0 0 0.1952 0.5855 0.3904 0.6831 0 0 0 0 0.0626 0.1879 0.1252 0.2505 0.9393 0 0 0 0.0290 0.0870 0.0580 0.1160 0.0580 0.9856 0 0 0.0764 0.2293 0.1529 0.3058 0.1529 0.0764 0.8919 0 0.0907 0.2722 0.1815 0.3630 0.1815 0.0907 0.2722 0.7985 ,  
H 8 ; # 2 = 0.1204 0.3612 0.2408 0.4815 0.2408 0.1204 0.3612 0.6019 0.9927 0.0438 0.0292 0.0584 0.0292 0.0146 0.0438 0.0730 0 0.9315 0.0947 0.1895 0.0947 0.0474 0.1421 0.2368 0 0 0.9655 0.1404 0.0702 00351 0.1053 0.1755 0 0 0 0.8421 0.1727 0.0864 02591 0.4318 0 0 0 0 0.9473 0.0541 0.1624 0.2707 0 0 0 0 0 0.9856 0.0870 0.1449 0 0 0 0 0 0 0.8575 0.5145 ,      
H 8 ; # 3 = 0.1204 0.3612 0.2408 0.4815 0.2408 0.1204 0.3612 0.6019 0.9487 0.3162 0 0 0 0 0 0 0.2582 0.7746 0.2582 0.5164 0 0 0 0 0 0 0.8944 0.4472 0 0 0 0 0.1373 0.4118 0.2745 0.5490 0.2112 0.1056 0.3168 0.5279 0 0 0 0 0.4472 0.8944 0 0 0 0 0 0 0.8351 0.4176 0.1842 0.3070 0 0 0 0 0 0 0.8575 0.5145 ,          
H 8 ; # 4 = 0.1204 0.3612 0.2408 0.4815 0.2408 0.1204 0.3612 0.6019 0.2026 0.2146 0.4053 0.2861 0.4053 0.0715 0.6079 0.3576 0.3801 0 0.2924 0 0.7601 0 0.4385 0 0 0.8506 0 0.2766 0 0.2835 0 0.3458 0.8944 0 0 0 0.4472 0 0 0 0 0.3162 0 0 0 0.9487 0 0 0 0 0.8321 0 0 0 0.5547 0 0 0 0 0.7809 0 0 0 0.6247 .        
If we consider the eight-point DsiHT with path #5 shown in Figure 3, we obtain the following matrix of the transformation:
H 8 ; # 5 = 0.1204 0.3612 0.2408 0.4815 0.2408 0.1204 0.3612 0.6019 0.4082 0.2449 0.8165 0.3266 0 0 0 0 0.8944 0 0.4472 0 0 0 0 0 0 0.8000 0 0.6000 0 0 0 0 0.1373 0.4118 0.2745 0.5490 0.2112 0.1056 0.3168 0.5279 0 0 0 0 0.4472 0.8944 0 0 0 0 0 0 0.8351 0.4176 0.1842 0.3070 0 0 0 0 0 0 0.8575 0.5145 .        
Each path defines the structure of the transformation matrix. The first rows in these matrices are the normalized generator x , that is, 1 , 3 , 2 , 4 2 , 1 , 3 , 5 × 0.1204 , and H 8 ; # n x = 69 , 0 , 0 , , 0 ,   n = 1 : 5 . The angles ϑ k , k = 1 : 7 of rotations in these transformations are given in Table 2 (in degrees). The number of zero coefficients in these matrices is also shown in the table (in the last column).
Now, we consider the Householder transformation matrix calculated as P 8 = I 8 2 v v / v and equal to
P 8 = 0.1204 0.3612 0.2408 0.4815 0.2408 0.1204 0.3612 0.6019 0.3612 0.8836 0.0776 0.1552 0.0776 0.0388 0.1164 0.1940 0.2408 0.0776 0.9483 0.1035 0.0517 0.0259 0.0776 0.1294 0.4815 0.1552 0.1035 0.7930 0.1035 0.0517 0.1552 0.2587 0.2408 0.0776 0.0517 0.1035 0.9483 0.0259 0.0776 0.1294 0.1204 0.0388 0.0259 0.0517 0.0259 0.9871 0.0388 0.0647 0.3612 0.1164 0.0776 0.1552 0.0776 0.0388 0.8836 0.1940 0.6019 0.1940 0.1294 0.2587 0.1294 0.0647 0.1940 0.6766 .                
There is no zero coefficient in the matrix. The determinant of this matrix is equal to 1 and the transform P 8 x = ( 69 , 0 , , 0 , 0 ) . The vector v is calculated as v = x + x 1 , 0 , , 0 , 0 = 1 + 69 , 3 , 2 , 4 , 2 , 1 , 3 , 5 .
One can notice that the number of zero coefficients in the matrices H 8 ; # 3 and H 8 ; # 4 (and H 8 ; # 5 ) is much greater than in the matrices H 8 ; # 1 and H 8 ; # 2 . These numbers are equal to 32 and 21, respectively. The number, z # 1 , 2 ( N ) , of zero coefficients in the matrices H N ; # 1 and H N ; # 2 is the same, as is the number, z # 3 , 4 ( N ) , of zero coefficients in the matrices H N ; # 3 and H N ; # 4 . In the case where N = 2 r , r 2 , these numbers are calculated as follows:
z # 1 , 2 ( N ) = N 1 N 2 2 ,   z # 3 , 4 ( N ) = N 2 N log 2 N + 1 .
These estimates, as well as the other equations presented below, were derived and then thoroughly verified using computer simulations with various N × N matrices for arbitrary integer N 3 .
Figure 4 shows the graphs of these functions in percentage terms for N = 2 r , r = 2 : 12 , that is, the number of zeros as a percentage of the matrix size 4 r is calculated for each of the following functions:
p # 1 , 2 ( r ) = z # 1 , 2 ( 2 r ) / 4 r × 100 %   and   p # 3 , 4 ( r ) = z # 3 , 4 ( 2 r ) / 4 r × 100 % .
For comparison, the first nine values of these numbers are given in Table 3. The table also shows the difference Δ z between the numbers z # 3 , 4 and z # 1 , 2 and their percentage compared to all N 2 coefficients in the matrices.
For N = 1024 , the difference of zero coefficients z # 3 , 4 and z # 1 , 2 is equal to 514,559. When multiplying matrices of the 1024-point DsiHT by a 1024-D vector z , the calculation requires no more than 1024 2 z # 3 , 4 ( 1024 ) = 11,264 multiplications, if the transforms with paths #3 and 4 are used. For matrices with paths #1 and #2, the calculation requires 1024 2 z # 1 , 2 ( 1024 ) = 525,823 multiplications, or more than 46 times as many. In the general case of N = 2 r ,   r > 2 , the number of multiplications when multiplying the matrices H # 3 , 4 by the vector z is estimated as
μ # 3 , 4 N = N 2 z # 3 , 4 N = N log 2 N + 1 ,
and, when multiplying H # 1 , 2 , the number of multiplications is estimated as
μ # 1 , 2 N = N 2 z # 1 , 2 N = 1 2 N 2 + 3 N 2 .
The number of operations saved when using the fast paths #3 and #4 is
Δ z N = z # 3 , 4 N z # 1 , 2 N = 1 2 N 2 N 2 r 1 + 1 .
These numbers are shown in column number 4 in Table 3.
Next, we show that the diagrams of the eight-point DsiHT, which are shown in Figure 2 for two different paths, can be used and simplified when calculating the seven-, six-, and five-point DsiHTs, by removing the last inputs in the diagrams.

3.1. The 7 -Point DsiHT

Let us consider the N = 7 case and the signal generator x = ( x 0 , x 1 , ,   x 6 ) . It is possible to consider the extended zero-padded 8-D vector x ~ = ( x 0 , x 1 , ,   x 6 , 0 ) and use the diagrams in Figure 2, after removing rotation number 4 and then changing the numbers of the next three rotations. The corresponding diagrams are shown in Figure 5. In stage 1, three rotations are used. The total number of rotations is equal to six.

3.2. The 6 -Point DsiHT

The diagrams for calculating the six-point DsiHTs via paths #3 and #4 are shown in Figure 6, in parts (a) and (b), respectively. For that, the diagrams in Figure 5 were used, after removing the last component x 6 from the input. In these two diagrams, the numbers of rotations at stages 1 and 2 are different. The total number of rotations is five.

3.3. The 5 -Point DsiHT

The last two simplifications of the diagrams of the eight-point DsiHT for the five-point DsiHT are shown in Figure 7. A total of four butterflies are used in both diagrams.

3.4. The 3 -Point DsiHT

The diagrams of the four-point DsiHTs are given in Figure 1. For the three-point DsiHT, there are only two paths that can be considered. The diagrams with these paths are shown in Figure 8. Two butterflies are used for these transforms.

3.5. Algorithm of the DsiHT with Path #4

We stand on path #4, for any order N of the DsiHT. The algorithm of the transformation with this path can be described as follows: Consider the smallest power of two, M = 2 n N . The calculation of the transform generated by the signal x = ( x 0 , x 1 , ,   x N 1 ) can be performed in two steps as follows:
  • The Givens rotations are applied to the pairs:
    R ϑ k : ( x k , x k + M / 2 ) x k , 0 ,   k = 0 , 1 , , N M 2 1 .
    We will receive the signal y = x 0 , x 1 , ,   x N M / 2 1 , x N M / 2 , , x M / 2 1 , 0 , 0 ,   ,   0 .
  • The M / 2 -point DsiHT with fast path #4 is applied to the M / 2 -point signal
    y 1 = x 0 , x 1 , , x N M 1 , x N M / 2 , , x M / 2 1 .
The total number of rotations is equal to ( N 1 ) .
As an example, we consider the diagram of the seven-point DsiHT which is shown in Figure 5 part (b), where N = 7 . The first three rotations are applied to the pairs ( x 0 , x 4 ) , ( x 1 , x 5 ) , and ( x 2 , x 6 ) . Then, the first outputs of these rotations, T k :   ( x k , x k + 4 ) ( x k , 0 ) ,   k = 0 , 1 , 2 , together with the input component x 3 , are used as the input signal, y = x 0 , x 1 ,   x 2 , x 3 , for the four-point DsiHT. The composition of the seven-point DsiHT is described by the following six matrices of rotations (or butterflies T k , k = 1 : 6 ):
H 7 ; 4 = R ϑ 6 ; ( 0 , 1 ) R ϑ 5 ; ( 1 , 3 ) R ϑ 4 ; ( 0 , 2 ) R ϑ 3 ; ( 2 , 6 ) R ϑ 2 ; ( 1 , 5 ) R ϑ 1 ; ( 0 , 4 ) .
Here, R ϑ k ; ( i , j ) , when j i , denotes the matrix composed by the 7 × 7 identity matrix [ a n , m ; n , m = 0 : 6 ] and coefficients of the matrix rotation R ϑ k at the points (i,i), (i, j ), ( j ,i), and ( j , j ). Thus,
H 7 ; # 4 = c 6 s 6 0 0 0 0 0 s 6 c 6 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 c 5 0 s 5 0 0 0 0 0 1 0 0 0 0 0 s 5 0 c 5 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 c 4 0 s 4 0 0 0 0 0 1 0 0 0 0 0 s 4 0 c 4 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 c 3 0 0 0 s 3 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 s 3 0 0 0 c 3 1 0 0 0 0 0 0 0 c 2 0 0 0 s 2 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 s 2 0 0 0 c 2 0 0 0 0 0 0 0 1 c 1 0 0 0 s 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 s 1 0 0 0 c 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 ,
where c k = cos ϑ k and s k = sin ϑ k , k = 1 : 6 . The transform of the signal generator x is the following vector:
H 7 x = x 0 k , 0 , 0 , 0 , 0 , 0 , 0 = x 0 2 + x 1 2 + + x 6 2 , 0 , 0 , 0 , 0 , 0 , 0 .

3.6. Number of Zero Coefficients in the DsiHT Matrices

For the N -point DsiHT calculated via paths #3 and 4, the number z N of zero coefficients is estimated as follows: If 2 r   N < 2 r + 1 , where r 2 , the following recurrence formula is valid:
z N + 1 = z N + 2 N r + 4 .
In other words, in the N + 1 × ( N + 1 ) matrix of the ( N + 1 ) -point DsiHT, there is 2 N r + 4 more zero coefficients than in the matrix of the N -point DsiHT. If we denote N = 2 r + n , where n 1 , 2 , , 2 r , then the number z N can be calculated as follows:
z N = z # 3 , 4 2 r + 2 r + 1 n + n n r 3   = 4 r +   2 r 2 n r 1 + n n r 3 .  
If N = 2 r , then z N = z # 3 , 4 N , calculated by Equation (20). A few values of these numbers are shown in Table 4.
The number of multiplications when multiplying the matrices H N by the N -dimensional vector z can be estimated as μ N = N 2 z N . These numbers are also given in Table 4, along with the maximum number of multiplications N 2 for comparison. Note that, for the N -point DsiHT with path #1, the number of zero coefficients is calculated by z 1 , 2 N = N 2 3 N + 2 / 2 , for any N 3 .

4. DsiHT-Based QR-Factorization

In this section, we describe the QR-factorization of a square matrix A of size N × N ,   N 3 by the Givens rotations. The unitary matrix A is considered with real coefficients. In the QR-factorization, ( N 1 ) DsiHTs are used. This factorization is illustrated below for a 5   ×   5 unitary matrix:
: 0 0 0 0 : 0 0 0 0 0 0 0 : 0 0 0 0 0 0 0 0 0 : 0 0 0 0 0 0 0 0 0 0 . A A 1 A 2 A 3 R
The first five-point DsiHT, H 5 , is generated by the first column of the matrix A and then it is applied to each of its columns. Four zero coefficients will be obtained in the new matrix A 1 in its first column, as shown above. A similar transform will be applied on the 4 × 4 submatrix (highlighted in red) of A 1 . Namely, the four-point DsiHT, H 4 , will be generated by the last four components of the second column of the matrix A 1 . This transform will be applied to each column of the 4 × 4 submatrix. In the new matrix A 2 , another three zero coefficients in the second column will be obtained. Then, the three-point DsiHT, H 3 , will be generated by the first column of the 3 × 3 submatrix of A 2 and applied on this submatrix. We will obtain a new matrix A 3 with nine zero coefficients, as shown in Equation (32). The last two-point DsiHT, H 2 , will be generated by the last two coefficients of the fourth column of A 3 and applied to its 2 × 2 submatrix. Thus, the matrix triangularization is completed as follows:
R = I 3 H 2 I 2 H 3 1 H 4 H 5 A .
Here,   I n is the identity n × n matrix. If we denote the unitary matrix Q 1 = I 3 H 2 I 2 H 3 1 H 4 H 5 and its inverse,
Q = Q 1 1 = Q 1 = H 5 1 H 4 I 2 H 3 I 3 H 2 ,
then we can write A = Q R . This is the result of the QR-factorization. The matrix R is upper triangular, and Q is the unitary matrix. The matrix operation ‘′’ stands for the matrix transposition.
Let us estimate the number m ( 5 ) of multiplications in the QR-factorization of the 5 × 5 matrix A . The first five-point DsiHT is applied to five columns of A . Then, the second four-point DsiHT is applied to four columns of the 4 × 4 submatrix of A 1 , and so on. Thus, considering the number of zero coefficients in the matrices of the DsiHTs, we obtain the following estimation:
m 5 = 5 μ 5 + 4 μ 4 + 3 μ 3 + 2 μ 2 = 5 17 + 4 12 + 3 8 + 2 4 = 165 .
The number of rotations that perform the QR-factorization of the matrix is equal to α N = 4 + 3 + 2 + 1 = 10 . If we use the Householder transformations in the QR-factorization of the same 5 × 5 matrix, the number of multiplications will be estimated by 5 25 + 4 16 + 3 9 + 2 4 = 224 .
Example 3.
Consider the following randomly generated 5 × 5 matrix:
A = 4 3 1 5 6 8 1 3 5 9 7 6 2 8 3 9 8 3 5 7 5 4 2 9 3 ,   det A 0 .
The QR-factorization of the matrix, A R , where the upper triangular matrix R is calculated, is as follows: The first five-point DsiHT with fast path #4 is generated by the column x = 4 , 8 , 7 , 9 , 5 . Therefore, the first matrix in this factorization is equal to the following:
H 5 = 0.2609 0.5219 0.4566 0.5871 0.3262 0.3312 0.4111 0.5796 0.4625 0.4140 0.4609 0 0.6749 0 0.5762 0 0.7474 0 0.6644 0 0.7809 0 0 0 0.6247 ,   det H 5 = 1 .
At the next three stages of the matrix factorization, the matrices are composed by the matrices of the four-, three-, and two-point DsiHTs and are equal to
1 H 4 = 1 0 0 0 0 0 0.4817 0.7545 0.4454 0.0152 0 0.5541 0.6559 0.5124 0.0132 0 0.6789 0 0.7342 0 0 0 0.0202 0 0.9998 ,   det H 4 = 1 ,
and
I 2 H 3 = 1 0 0 0 0 0 1 0 0 0 0 0 0.7060 0.4796 0.5211 0 0 0.3859 0.8775 0.2848 0 0 0.5939 0 0.8046 ,   I 3 H 2 = 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.2077 0.9782 0 0 0 0.9782 0.2077 .
The unitary matrix Q is calculated by Equation (34) and is equal to the following:
Q = 0.2609 0.1764 0.1838 0.9304 0.0383 0.5219 0.1349 0.5066 0.0483 0.6712 0.4566 0.7885 0.2675 0.0186 0.3129 0.5871 0.5187 0.5046 0.3628 0.0025 0.3262 0.2448 0.6192 0.0121 0.6709 ,   det Q = 1 .
The triangular matrix is as follows:
R = Q A = 15.3297 4.5663 1.1090 0.2609 6.8494 0 10.2542 3.2244 6.1251 4.4590 0 0 3.9209 11.8495 4.7902 0 0 0 6.4810 8.4648 0 0 0 0 4.5743 .
Ten angles of rotations in these four DsiHTs are given in Table 5 (in degrees). This is an encoded table of the QR-factorization by the DsiHTs with path #4. In other words, the unitary matrix Q is encoded in this table.
We remind readers that, in the QR-factorization, the triangularization T : A R is accomplished by a unitary matrix Q . The original matrix is integer-valued, and it is always possible to fulfill the triangularization via the integer matrices only, as shown below:
R i = T A = 2 0 1 0 0 12 11 5 0 1 33 1 1 13 0 1 15 7 0 15 153 2681 1250 10 2680 A = 1 12 4 18 9 0 1 33 26 183 0 0 1 233 295 0 0 0 1 105 0 0 0 0 18991 .
The determinant of the matrix T is 1, but this matrix is not unitary. To calculate the matrix A from this equation as A = T 1 R i , the inverse of the matrix T 1 is required, which is not the transpose matrix, that is, Q = T 1 T .
The QR-factorization of the same matrix A by the Householder reflections results in the following matrices:
Q = 0.2609 0.1764 0.1838 0.9304 0.0383 0.5219 0.1349 0.5066 0.0483 0.6712 0.4566 0.7885 0.2675 0.0186 0.3129 0.5871 0.5187 0.5046 0.3628 0.0025 0.3262 0.2448 0.6192 0.0121 0.6709 ,   det Q = 1 ,
and
R = 15.3297 4.5663 1.1090 0.2609 6.8494 0 10.2542 3.2244 6.1251 4.4590 0 0 3.9209 11.8495 4.7902 0 0 0 6.4810 8.4648 0 0 0 0 4.5743 .
It can be noted that the coefficients of these matrices differ only in signs from the corresponding matrices of the DsiHT-based QR-factorization, given in Equations (40) and (41). This example illustrates the advantage of the DsiHT-based method over the Householder reflection method. The results are almost the same, but the DsiHTs reduce the operations of multiplication by the number 224 165 = 59 , plus the encoded QR-factorization table is generated.
Such a table can be used to create a unitary matrix 5 × 5, as Q 1 = I 3 H 2 I 2 H 3 1 H 4 H 5 or Q = Q 1 = H 5 1 H 4 I 2 H 3 I 3 H 2 . Indeed, if we randomly change the angles in Table 5, we will obtain different unitary matrices H k ,   k = 2 : 5 . These four matrices are composed of 10 rotations. In the general case of N 3 , such a table with randomly chosen angles for N ( N 1 ) / 2 rotations can be used as an encoding table to generate unitary N × N matrices. The set of bit planes on which these rotations operate is fixed. This set will only change if we change the paths for DsiHTs. Thus, one code (with arbitrarily specified angles) can be used to generate a random unitary matrix.
The numbers of multiplication operations for the QR-factorization by the Householder reflections and DsiHTs with paths #1 and #4 are calculated by
m H N = 2 3 + 3 3 + 4 3 + + N 3 = 1 4 N 2 N + 1 2 1 ,
m # 1 , 2 N = n = 2 N n μ # 1,2 n = n = 2 N n 1 2 n 2 + 3 n 2 = 1 2 n = 2 N n 3 + 3 n 2 2 n = 1 8 N 2 N + 1 2 4 + 1 4 N N + 1 2 N + 1 6 1 2 N + 2 N 1 = 1 8 N 4 + 6 N 3 + 3 N 2 2 N 1 ,
m # 3 , 4 N = n = 2 N n μ # 3 , 4 n = k = 2 N n n 2 z # 3 , 4 n ,
where z # 3 , 4 n = z ( n ) is calculated by Equation (31). The values of these estimations for small values of N = 3 : 14 and for powers of two, 128 ,   256 ,   512 ,   1024 , and 2048 , are given in Table 6.
One can note that the DsiHT-based method with fast path #4 requires a smaller number of multiplications when compared with path #1 as well as the Householder reflection-based method. The graphs of the functions m H ( N ) and m # 1 ( N ) are shown in Figure 9a, where N = 3 : 512 , and in part (b), where N = 512 : 2048 .
For comparison with the method of DsiHT with path #4, Figure 10 illustrates the ratios of functions r 1 N = m H ( N ) / m # 4 ( N ) and r 2 N = m # 1 ( N ) / m # 4 ( N ) in the integer interval [2,2048]. These two curves are approximately equal to the lines with the slopes a 1 = m H ( 2048 ) / m # 4 ( 2048 ) 132.77 and a 2 = m # 1 ( 2048 ) / m # 4 ( 2048 ) 66.51 .

5. Complex QsiHT

In this section, we describe the complex DsiHTs that allow for QR-factorization of complex matrices. The DsiHTs described above are real and composed of rotation operations, or butterflies in the diagrams, denoted by T k , which are the basic elements (building blocks) from which we build a transformation. Each of them is described by a 2 × 2 unitary matrix. For the complex DsiHT, we just need to replace the real butterflies with complex ones, leaving the paths the same. Therefore, the fast complex DsiHT is defined as a complex extension of the real DsiHT with the same fast path. These complex transformations can then be used in the QR-factorization of complex matrices in a similar way to how they are used for the decomposition of real matrices. As shown in [36], there are different complex matrices 2   ×   2 that can be used as the basis elements to compose the N -point complex DsiHT.
A.
First, we consider the following 2 × 2 matrix:
M = 1 x 2 + | y | 2 x ¯ y ¯ y x ¯ | x | | x | .
Numbers x 0 and x 1 are complex. The matrix M is unitary and its determinant det M = x ¯ / | x | and det M = 1 . The matrix product is
M x y = 1 x 2 + | y | 2 x 2 + | y | 2 0 = x 2 + | y | 2 0 .
It should be noted that such matrices are used in quantum computation for realization of complex multi-qubit operations [37]. Therefore, this matrix is decomposed by basic 2 × 2 operations, or gates. For that, the polar form of the numbers is considered, that is,   x = x e i φ 0 and y = y e i φ 1 . Then, Equation (48) can be written as
M = 1 x 2 + | y | 2 x e i φ 0 y e i φ 1 y e i ( φ 1 φ 0 ) x .
This complex matrix can be encoded by four angles in the following way: First, we calculate the angle ϑ = atan ( y / x ) and then denote the cosine and sine coefficients
cos ϑ = x x 2 + | y | 2   a n d   sin ϑ = y x 2 + | y | 2 .
The matrix M can be written as
M = e i φ 0 cos ϑ e i φ 1 sin ϑ e i ( φ 1 φ 0 ) sin ϑ cos ϑ = 1 0 0 e i φ 0 e i φ 0 cos ϑ e i φ 1 sin ϑ e i φ 1 sin ϑ e i φ 0 cos ϑ ,
or
M = 1 0 0 e i φ 0 e i ( φ 0 + φ 1 ) / 2 0 0 e i ( φ 0 + φ 1 ) / 2 cos ϑ sin ϑ sin ϑ cos ϑ e i ( φ 0 φ 1 ) / 2 0 0 e i ( φ 0 φ 1 ) / 2 .
The first matrix in this factorization is known as the phase shift, the second and fourth ones are Z -rotations [39], and the third matrix is the matrix of the elementary rotation. Thus, we can encode the matrix M by four angles as Φ = φ 0 , φ 0 + φ 1 , ϑ , φ 0 φ 1 . The QR-factorization of a complex matrix by such complex M matrices is described in detail in [36]. For this purpose, the concepts of the complex DsiHTs with the strong and weak carriage wheels are used.
B.
Other 2 × 2 matrices also can be used instead of the matrix M . We mention the known complex Givens rotation with the matrix [4],
G = 1 x 0 2 + | x 1 | 2 | x 0 | x 0 | x 0 | x ¯ 1 x 1 x ¯ 0 | x 0 | | x 0 | ,   det G = 1 .
When applying the matrix G to the vector generator x 0 , x 1 , we obtain x 0 / | x 0 | x 0 2 + | x 1 | 2 , 0 . Two coefficients of this matrix are real, and, in the matrix M , only one coefficient is real. We can consider the complex matrix with all complex coefficients. For instance, the unitary matrix is defined as follows:
T = s i g n ( R e a l x 0 ) x 0 2 + | x 1 | 2 x ¯ 0 x ¯ 1 x 1 x 0 ,
for which T ( x 0 , x 1 ) = s i g n ( R e a l x 0 x 0 2 + | x 1 | 2 , 0 . The complex vector ( x 0 , x 1 ) is rotated to the positive or negative direction of the real axis. The matrices G and T can be expressed by the matrix M as follows:
G = x 0 | x 0 | 0 0 1 M   a n d   T = s i g n ( R e a l x 0 1 0 0 | x 0 | x ¯ 0 M , i f   x 0 0 .
C.
A comparison of the QR-factorizations of a complex square matrix by the matrices M , G , and T , when using the weak and strong DsiHTs, is given in [36], together with examples and MATLAB-based codes.
The following should be noted about the matrix M : The QR-factorization by this matrix can be calculated analytically without rotation angles and matrices. For simplicity of calculations, we consider the weak DsiHTs. First, let the matrix A be real. The following notations for an input N -dimensional vector z and the vector generator x are used:
E n z , x = z 0 x 0 + z 1 x 1 + + z n 1 x n 1 , n = 1 : N ,
and
E n x 2 = E n x , x = x 0 2 + x 1 2 + + x n 1 2 ,
for the partial energies E n x of the signal generator. The DsiHT of the input vector z = ( z 0 , z 1 , . , z N 1 ) , that is, H N , # 1 z = ( z 0 N 1 , z 1 1 , z 2 1 , , z N 1 1 ) can be calculated by the correlation data as follows:
z 0 ( N 1 ) = E N z , x / E N x ,
z n ( 1 ) = E n x , x z n E n z , x x n E n + 1 x E n x , n = 1 : N 1 .
For a given generator x , all values of E n x , x and E n 1 x E n x can be calculated in advance. The coefficients h n , m ,   n , m = 0 : N 1 of the matrix H N , # 1 can be obtained from Equations (57)–(60). For that, the standard procedure is used. The m-th column of this matrix is the DsiHT of the unit vector e m = ( 0 ,   0 ,   ,   1 ,   , 0 ) , with 1 at the m-th position. Therefore, all coefficients can be calculated using the formulas
h 0 , m = E N e m , x E N x ,   h n , m = E n x 2 ( e m ) n E n e m , x x n E n + 1 x E n x , n = 1 : N 1 .
The diagonal coefficients of this matrix h n , n = E n x / E n + 1 x represent the ratios of the energies of the first n  components of the signal to the ( n + 1 ) components.
When the matrix A is complex, the complex DsiHT can be calculated by using the similar formulas. The partial cross-correlations of the complex input z with the complex generator x are calculated by
E n z , x = z 0 x ¯ 0 + z 1 x ¯ 1 + + z n 1 x ¯ n 1 , n = 1 : N ,
and the partial energies E n x of the generator are calculated by
E n x 2 = E n x , x = x 0 2 + x 1 2 + + x n 1 2 .
The above matrices M , G , and T can be used for calculating the DsiHTs in QR-factorization with fast paths #3 and #4. However, we consider another and more effective way to perform the basic operation x , y ( z , 0 ) on complex data.
D.
We introduce a new matrix instead of the above matrix M . First, we remove the phases from the complex numbers x and y , as x , y x , y . In the matrix form, this operation can be written as
e i φ 0 0 0 e i φ 1 x y = e i φ 0 0 0 1 1 0 0 e i φ 1 x y = | x | | y | .
Then, the elementary rotation can be used on the real vector:
T | x | | y | = cos ϑ sin ϑ sin ϑ cos ϑ | x | | y | = | x | 2 + | y | 2 0 .
Here, the rotation angle is calculated as ϑ = arctan | y | / | x | [ π / 2 , 0 ] . If x = 0 , then ϑ = π / 2 . We obtain the following complex-to-real transformation:
A : x , y | x | 2 + | y | 2 , 0 ,
with the matrix
A = cos ϑ sin ϑ sin ϑ cos ϑ e i φ 0 0 0 e i φ 1 .
This matrix is simple when compared to the matrix M , and it can be encoded by three angles Ψ = φ 0 , φ 1 , ϑ . We also can write A = A ( φ 0 , φ 1 , ϑ ) . If the input x and y are real, we prefer to use the original matrix of rotation, which is defined in Equation (1). Then, the matrix will be encoded as Ψ = 0 , 0 , ϑ . The complex N -point DsiHT with the basic matrix A in Equation (67) is a straightforward extension of the real N -point DsiHT.
Example 4.
Let us consider the complex five-point signal
x = ( x 0 , x 1 , x 2 , x 3 , x 4 ) = 1 + i , 2 + 3 i , 5 + 4 i , 3 + i , 4 2 i ,   x = 86 .
The matrix of the five-point DsiHT generated by x and path #4 has the following complex unitary 4 × 4 matrix:
H 5 = 0.1078 0.2157 0.5392 0.3235 0.4313 0.0652 0.3569 0.3258 0.5354 0.2606 0.1720 0 0.4614 0 0.6880 0 0.3658 0 0.7132 0 0.6742 0 0 0 0.2697   + i 0.1078 0.3235 0.4313 0.1078 0.2157 0.0652 0.5354 0.2606 0.1785 0.1303 0.1720 0 0.3692 0 0.3440 0 0.5486 0 0.2377 0 0.6742 0 0 0 0.1348 .
This matrix has eight zero coefficients, as in the case of real matrices. The determinant of the matrix is equal to det H 5   = 0.9443 + 0.3292 i and | det H 5 | = 1 . Up to the constant 0.1078 = 1 / 86 , the first row of the matrix is the generator x , that is, it is equal to x / x . A diagram of this transformation is shown in Figure 11 and it looks like what is shown in Figure 7b. Only the butterflies with rotations T k ,   k = 1 : 4 are changed by the complex ‘butterflies’ with operations A k = A ( φ 0 ; k , φ 1 ; k , ϑ k ) .
All angles of the complex operations A k ,   k = 1 : 4 in this DsiHT are given in Table 7.
Now, we consider the example of the QR-factorization of a complex matrix by the DsiHT with path #4.
Example 5.
Consider the following 5 × 5 complex matrix:
A = 4 3 1 5 6 8 1 3 5 9 7 6 2 8 3 9 8 3 5 7 5 4 2 9 3 + i 1 1 3 5 4 3 5 1 1 1 2 3 4 2 4 2 2 3 2 1 2 1 5 1 5 ,   | det A | > 117710 .
The QR-factorization of this matrix, H 2 H 3 H 4 H 5 : A R , by four complex DsiHTs, each with path #4, results in the following matrices:
Q H = Q H ; # 4 = 0.2495 0.1281 0.1843 0.2960 0.1733 0.4990 0.1047 0.0140 0.4973 0.5008 0.4366 0.7785 0.0203 0.1934 0.2135 0.5614 0.4034 0.4464 0.3933 0.0999 0.3119 0.1699 0.4737 0.2512 0.0346 + i 0.0624 0.0528 0.2389 0.5986 0.5896 0.1871 0.2200 0.3370 0.2036 0.0567 0.1248 0.3216 0.0005 0.0175 0.0227 0.1248 0.0891 0.1497 0.0693 0.3277 0.1248 0.1109 0.5905 0.0709 0.4512  
and (upper triangular)
R H = R H ; # 4 = 16.0312 5.4893 1.9337 0.2495 6.1131 0 11.2651 3.8074 5.6319 4.5929 0 0 6.1090 4.9145 4.9253 0 0 0 12.3561 4.0932 0 0 0 0 5.3096 + i 0 2.9942 2.2456 0.0624 1.4347 0 0 5.1383 4.4913 1.2587 0 0 0 5.1204 1.7614 0 0 0 0 7.8876 0 0 0 0 6.8097 .
We need to mention that the coefficients in the diagonal of the upper triangular matrix R H are real, except the last coefficient. Therefore, the imaginary part of the matrix has four more zeros than the real part. The angles of all ten complex operations A k in this QR-factorization are given in Table 8.
The unitary matrix is equal to Q H = ( H 2 H 3 H 4 H 5 ) . Table 7 can be considered as an encoded table of angles for Q H . Any such encoded table, namely, the set of 30 angles, can be used to generate a complex unitary 5 × 5 matrix. In the general case of N > 2 , such encoded tables of angles for ( N 1 ) DsiHTs with path #4 can be used to generate a complex unitary N × N matrix. The number of angles in the encoded table is equal to 3 / 2 N N 1 .
Now, we will analyze the MATLAB version of the QR-factorization of the same matrix, A = Q M R M , which is calculated by the function ‘qr.m,’ as ‘[Q_M,R_M] = qr(A).’ The method of the Householder transformations is programmed in this function. Many coefficients of these two matrices are equal up to the sign of the coefficients of the corresponding matrices Q H and R H . Therefore, we consider the pointwise ratio of the matrices
R e a l Q H . / R e a l Q M = 1 1 1 1 0.3032 1 1 1 1 1.9027 1 1 1 1 1.4308 1 1 1 1 0.5074 1 1 1 1 0.0918 ,
I m a g Q H . / I m a g Q M = 1 1 1 1 2.6100 1 1 1 1 0.1320 1 1 1 1 0.1473 1 1 1 1 1.1690 1 1 1 1 1.8038 ,
and
R e a l R H . / R e a l R M = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.6149 ,
I m a g R H . / I m a g R M = 1 1 1 1 1 1 1 1 1 1 6.8097 / 0 .
Here, the symbol ‘*’ is used at points where the coefficients of the matrices are zero (as 0/0). The last coefficients of the triangular matrices are R H ( 5 , 5 ) = 5.3096 + 6.8097 i and R M ( 5,5 ) =   8.6350 . The major difference of these matrices is in the coefficients of the last columns.
Although we are writing A = Q H R H and A = Q M R M , there are small errors in calculation of the matrix A by Q and R matrices. To compare the results of the QR-factorization, the precision of computation has been estimated by the 2-norms of the matrix H = ( A Q H R H ) and matrix M = ( A Q M R M ) , by using the MATLAB function “norm.m.” The results of the calculation are as follows:
M = 1.3688 × 10 14 ,   H = 0.4956 × 10 14 ,   a n d   M / H = 2.7621 .
Relative to the 2-norm, the error of the QR-factorization by the DsiHTs with fast path #4 is more than two times smaller than the error when using the method of the Householder transformations.
As mentioned above, the fast paths, like paths #3 and #4, allow us to decompose the matrix A by using matrices with more zero coefficients than when using paths #1 and #2. It means that fewer operations of multiplication and addition will be used, and results will be more accurate. That can be verified in this example as well. For instance, we consider the QR-factorization by DsiHTs with path #1 (that is, the DsiHTs with the weak carriage wheels). The calculations by the analytical Equation (56) result in the following complex matrices:
Q H ; # 1 = ° ° ° ° 0.6012 ° ° ° ° 0.0183 ° ° ° ° 0.0390 ° ° ° ° 0.3191 ° ° ° ° 0.4525 + i ° ° ° ° 0.1277 ° ° ° ° 0.5037 ° ° ° ° 0.2111 ° ° ° ° 0.1247 ° ° ° ° 0 ,
R H ; # 1 = 0 ° ° ° ° 0 ° ° ° ° 0 0 ° ° ° 0 0 0 ° ° 0 0 0 0 7.1959 + i 0 ° ° ° ° 0 0 ° ° ° 0 0 0 ° ° 0 0 0 0 ° 0 0 0 0 4.7732 .
Here, only those coefficients in the matrices Q H ; # 1 and R H ; # 1 that differ from the coefficients of the corresponding matrices Q H ; # 4 and R H ; # 4 are given. All other coefficients are equal and marked by ‘ ° .’ Note that all coefficients in the above matrices are given with an accuracy of up to four decimal places.
The results of the calculation of the 2-norm of the matrix H ; # 1 = A Q H ; # 1 R H ; # 1 are as follows:
H ; # 1 = 1.1803 × 10 14 ,   M / H ; # 1 = 1.1597 .
Relative to the 2-norm, the error of the QR-factorization by the DsiHTs with fast path #1 is smaller than the error when using the Householder transformations. However, this 2-norm is larger than the 2-norm H ; # 4 of the factorization by the fast paths. Namely, H ; # 1 / H ; # 4 = 2.3816 .
In conclusion, we consider the example of a complex matrix of a large size, and we compare the results of the QR-factorization by the DsiHTs with path #4 with the MATLAB version of the factorization.
Example 6.
The 256  ×  256 complex matrix  A  is composed of two real images, as shown in Figure 12a. The real part of this matrix is the ‘cameramen.tif’ image of 256  ×  256 pixels. The imaginary part of this matrix represents the grayscale ‘peppers.tiff’ image of 512  ×  512 pixels after down-sampling to the size of 256  ×  256 pixels. These images are taken from the database at the following address: http://sipi.usc.edu/database (accessed on 1 January 2020). The real and imaginary parts of this complex matrix are integer-valued non-negative matrices. The result of the DsiHT-based QR-factorization of 256  ×  256 complex image  A  is shown in Figure 12b. Visually, it is difficult to see the difference between these two images in this figure. The difference matrix  H  has values in the small interval  10 12 × 0.7105,0.5684  and is shown in Figure 12c as the image after scaling using the MATLAB function ‘imagesc.m.’ The 2-norm of the difference matrix  H = ( A Q H R H )  is equal to  H 0.2054 × 10 10 .
Figure 13 shows the image of the unitary matrix Q H together with the image of the triangular matrix R H . Since the values of the matrix Q H are small, this matrix is displayed at an absolute scale with a factor of 2000. The matrix of R H is also displayed at an absolute scale with a factor of 3.
For comparison, Figure 14a shows the result Q M R M obtained when using MATLAB code ‘qr(A).’ The 2-norm of the difference matrix M = ( A Q M R M ) is equal to M 0.25344 × 10 10 . This 2-norm is 1.2337 times larger than the 2-norm H . Since the original images are integer-valued, the results Q H R H and Q M R M can be rounded before displaying them. The rounding of the matrix Q M R M is shown in Figure 14b. There is a zero error between the rounded matrix Q H R H and the matrix A . The same is true for the rounded matrix Q M R M .

6. Conclusions

The discrete signal-induced heap transform-based method for the QR-factorization of a square matrix has different realizations. This is explained by the presence of different paths when performing the DsiHTs. Our goal is to present the fast paths which lead to effective calculation of the QR-factorization of a square N × N matrix, real or complex. We focused on two such paths, called fast paths #3 and #4. The DsiHTs with these fast paths have sparse matrices, and the calculation of the QR-factorization by such DsiHTs is described in detail. The sparsity of the matrices of DsiHTs can be assessed as significant. For instance, in the 2048 × 2048 matrix, the number of zero coefficients is 4,169,728, or 98.93% of all 4,194,304 coefficients. The presented fast paths were designed in such a way that all rotations in the QR-factorization are performed only on the adjacent bit planes. It is extremely important to have decompositions of all matrices using the basic operations on such bit planes. This property is especially important to consider when implementing operations in quantum computing.
Exact estimates of multiplication operations for calculating the DsiHT-based QR-decomposition of a square matrix are given in equations and verified using computer simulations with various N × N matrices. Examples for the cases where N = 5 ,   8 , and 256 are described in detail and compared with the method of Householder transformations. Also, we propose to use simple 2 × 2 complex matrices in Equation (67), for the ‘complex Givens rotations’ instead of the known M , G , and T matrices described in Section 5. These rotations allow us to obtain a straightforward extension of the real N -point DsiHT in the complex case and effectively use them in QR-factorization of complex matrices. In addition, all codes for computing the QR-factorization of square matrices (real and complex) are provided. These programs are intended to help readers become familiar with the described algorithms and the use of the proposed transformations for QR-factorization in various applications in computing and data analysis.
Many special cases of QR-factorization where matrices are sparse, or where there is a special class of tall-and-skinny N × M matrices, when N M , are outside the scope of this work. However, I believe that, even in these cases, there are fast paths for DsiHTs that will lead to efficient communication-avoiding QR-factorization. These are the tasks for future work.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Author codes based on MATLAB are available on the web page https://ceid.utsa.edu/agrigoryan/codes/ (accessed on 8 January 2026).

Conflicts of Interest

The author declares no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
DsiHTDiscrete signal-induced heap transform
QRQR-factorization of the matrix
BPBit plane

Appendix A

Two packages of my programs, written in MATLAB for computing the DsiHTs and QR-factorization by the DsiHTs, can be found on the webpage with the following address: https://ceid.utsa.edu/agrigoryan/codes/ (accessed on 8 January 2026). The main codes are the following:
1.
‘example_QRfactorization.m’—for the QR-factorization of the real N × N matrix A (randomly generated) by the DsiHTs with fast path #4 (and by the Householder transformations for comparison).
2.
‘example_QRFactorization_complexImages.m’—for the QR-factorization of a complex N × N matrix A . This code illustrates Example 6 with the 256 × 256 matrix in Section 5 but can also be used for other matrices.

References

  1. Horn, R.A.; Charles, R.J. Matrix Analysis; Cambridge University Press: Cambridge, UK, 1985. [Google Scholar]
  2. Scott, D.T.; Bryce, G.R.; Allen, D.M. Orthogonalization-triangularization methods in statistical computations. Amer. Statist. 1985, 39, 128–135. [Google Scholar]
  3. Coleman, T.F.; Van Loan, C.F. Handbook for Matrix Computations; SIAM: Philadelphia, PA, USA, 1988. [Google Scholar]
  4. Golub, G.H.; Van Loan, C.F. Matrix Computations, 3rd ed.; Johns Hopkins: Baltimore, MD, USA, 1996. [Google Scholar]
  5. Goodall, C.R. Computation using the QR decomposition. In Handbook of Statistics; Rao, C.R., Ed.; Ch 13; Elsevier Science Publishers B.V.: Amsterdam, The Netherlands, 1993; Volume 9, pp. 467–508. [Google Scholar]
  6. Trefethen, L.N.; Bau, D., III. Numerical Linear Algebra; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 1997. [Google Scholar]
  7. Moon, T.K.; Stirling, W.C. Mathematical Methods and Algorithms for Signal Processing; Prentice Hall: Englewood Cliffs, NJ, USA, 2000. [Google Scholar]
  8. Xiao, L.; He, Y.; Li, Y.; Dai, J. Design and analysis of two nonlinear ZNN models for matrix LR and QR factorization with application to 3-D moving target location. IEEE Trans. Ind. Inform. 2023, 19, 7424–7434. [Google Scholar] [CrossRef]
  9. Alizadeh, M.; Sajedi, H.; Babaali, B. Image watermarking by Q Learning and matrix factorization. In Proceedings of the 2020 International Conference on Machine Vision and Image Processing (MVIP), Qom, Iran, 18–20 February 2020; pp. 1–7. [Google Scholar] [CrossRef]
  10. Hai, N.T.; Thanh, T.M. Robust image watermarking algorithm integrating QR and singular value decomposition in the discrete wavelet transform domain. In Proceedings of the 2025 2nd International Conference on Cryptography and Information Security (VCRIS), Hanoi, Vietnam, 30–31 October 2025; pp. 1–6. [Google Scholar] [CrossRef]
  11. Lu, X.; Li, B.; Zeng, J. Radar-embedded communication waveform design based on QR decomposition. In Proceedings of the 2024 4th International Symposium on Computer Technology and Information Science (ISCTIS), Xi’an, China, 12–14 July 2024; pp. 841–848. [Google Scholar] [CrossRef]
  12. Sokolovskiy, V.; Tyapkin, V.N.; Veisov, E.A.; Fateev, Y.L. The pipelined QR decomposition hardware architecture based on Givens rotation CORDIC algorithm. In Proceedings of the 2019 International Siberian Conference on Control and Communications (SIBCON), Tomsk, Russia, 18–20 April 2019; pp. 1–4. [Google Scholar] [CrossRef]
  13. Saraf, N.; Bemporad, A. A bounded-variable least-squares solver based on stable QR updates. IEEE Trans. Autom. Control. 2020, 65, 1242–1247. [Google Scholar] [CrossRef]
  14. Strang, G. Linear Algebra and Learning from Data, 1st ed.; Wellesley Cambridge Press: Wellesley, MA, USA, 2019; p. 143. [Google Scholar]
  15. Subramani, C.; Kuppili, V.; Keshavamurthy, B.N.; Prasad, R.; Jagannath, K.; Prashanth, G.R. The least square QR method improves extreme learning machine. In Proceedings of the 2023 IEEE World Conference on Applied Intelligence and Computing (AIC), Sonbhadra, India, 29–30 July 2023; pp. 1–6. [Google Scholar] [CrossRef]
  16. Guerrero-García, P.; Hendrix, E.M.T. Experiments with active-set LP algorithms allowing basis deficiency. Computers 2023, 12, 3. [Google Scholar] [CrossRef]
  17. Anderson, M.; Ballard, G.; Demmel, J.; Keutzer, K. Communication-avoiding QR decomposition for GPUs. In Proceedings of the 2011 IEEE International Parallel & Distributed Processing Symposium, Anchorage, AK, USA, 16–20 May 2011; pp. 48–58. [Google Scholar] [CrossRef]
  18. Constantine, P.G.; Gleich, D.F. Tall and skinny QR factorizations in MapReduce architectures. In MapReduce’11: The Second International Workshop on Mapreduce and Its Applications; Association for Computing Machinery: New York, NY, USA, 2011; pp. 43–50. [Google Scholar] [CrossRef]
  19. Benson, A.R.; Gleich, D.F.; Demmel, J. Direct QR factorizations for tall-and-skinny matrices in MapReduce architectures. arXiv 2013, arXiv:1301.1071. [Google Scholar]
  20. Zhang, X.M.; Li, T.; Yuan, X. Quantum state preparation with optimal circuit depth: Implementations and applications. Phys. Rev. Lett. 2022, 129, 230504. [Google Scholar] [CrossRef]
  21. Vartiainen, J.J.; Möttönen, M.; Salomaa, M.M. Efficient decomposition of quantum gates. Phys. Rev. Lett. 2004, 92, 177902. [Google Scholar] [CrossRef] [PubMed]
  22. Mikko, M.; Juha, J. Vartiainen, Decompositions of general quantum gates. arXiv 2005, arXiv:quant-ph/0504100v1. [Google Scholar]
  23. Plesch, M.; Brukner, C. Quantum state preparation with universal gate decompositions. arXiv 2010, arXiv:1003.5760v2. [Google Scholar] [CrossRef]
  24. Björck, A. Solving linear least squares problems by Gram-Schmidt orthogonalization. BIT Numer. Math. 1967, 7, 1–21. [Google Scholar] [CrossRef]
  25. Alonso, P.; Peña, J.M.; Serrano, M.L. QR decomposition of almost strictly sign regular matrices. J. Comput. Appl. Math. 2017, 318, 646–657. [Google Scholar] [CrossRef]
  26. Rutishause, H. Simultaneous Iteration Method for Symmetric Matrices. In Linear Algebra. Handbook for Automatic Computation; Bauer, F.L., Ed.; Springer: Berlin/Heidelberg, Germany, 2017; Volume 186. [Google Scholar]
  27. Householder, A.S. Unitary triangulation of a nonsymmetric matrix. J. ACM 1958, 5, 339–342. [Google Scholar] [CrossRef]
  28. Hsiao, S.F.; Delosme, J.-M. Householder CORDIC algorithms. IEEE Trans. Comput. 1995, 44, 990–1001. [Google Scholar] [CrossRef]
  29. Ying, L.; Musheng, W.; Fengxia, Z.; Jianli, Z. Real structure-preserving algorithms of Householder based transformations for quaternion matrices. J. Comput. Appl. Math. 2016, 305, 82–91. [Google Scholar] [CrossRef]
  30. Businger, P.; Golub, G.H. Linear Least Squares Solutions by Householder Transformations. In Linear Algebra. Handbook for Automatic Computation; Bauer, F.L., Ed.; Springer: Berlin/Heidelberg, Germany, 2017; Volume 2. [Google Scholar]
  31. Bindel, D.; Demmel, J.; Kahan, W.; Marques, O. On Computing Givens Rotations Reliably and Efficiently; LAPACK Working Note 148; UT-CS-00-449; University of Tennessee: Knoxville, TN, USA, 2001. [Google Scholar]
  32. Demmel, J.; Grigori, L.; Hoemmen, M.; Langou, J. Communication-optimal parallel and sequential QR and LU factorizations. SIAM J. Sci. Comp. 2012, 34, 206–239. [Google Scholar] [CrossRef]
  33. Bindel, D.; Demmel, J.; Kahan, W.; Marques, O. On computing givens rotations reliably and efficiently. ACM Trans. Math. Softw. 2002, 28, 206–238. [Google Scholar] [CrossRef]
  34. Pereira, W.S.; Lotfi, A.; Langou, J. Numerical analysis of Givens rotation. arXiv 2022, arXiv:2211.04010. [Google Scholar] [CrossRef]
  35. Grigoryan, A.M. New method of Givens rotations for triangularization of square matrices. J. Adv. Linear Algebra Matrix Theory (ALAMT) 2014, 4, 65–78. [Google Scholar] [CrossRef]
  36. Grigoryan, A.M. Effective methods of QR-decompositions of square complex matrices by fast discrete signal-induced heap transforms. Adv. Linear Algebra Matrix Theory (ALAMT) 2023, 12, 87–110. [Google Scholar] [CrossRef]
  37. Grigoryan, A.M. New permutation-free quantum circuits for implementing 3- and 4-qubit unitary operations. Information 2025, 16, 621. [Google Scholar] [CrossRef]
  38. Grigoryan, A.M.; Gomez, A.A.; Agaian, S.S. A novel approach to state-to-state transformation in quantum computing. Information 2025, 16, 689. [Google Scholar] [CrossRef]
  39. Nielsen, M.A.; Chuang, I.L. Quantum Computation and Quantum Information; Cambridge University Press: Cambridge, UK, 2000. [Google Scholar]
Figure 1. Four diagrams for calculating the 4-point DsiHT with (a) path #1, (b) path #2, (c) path #3, and (d) path #4.
Figure 1. Four diagrams for calculating the 4-point DsiHT with (a) path #1, (b) path #2, (c) path #3, and (d) path #4.
Computers 15 00067 g001
Figure 2. The diagrams for calculating the 8-point DsiHT with (a) path #3 and (b) path #4.
Figure 2. The diagrams for calculating the 8-point DsiHT with (a) path #3 and (b) path #4.
Computers 15 00067 g002
Figure 3. The diagram for calculating the 8-point DsiHT with path #5.
Figure 3. The diagram for calculating the 8-point DsiHT with path #5.
Computers 15 00067 g003
Figure 4. The graph of the number of zero coefficients in the matrices of the 2 r -point DsiHTs.
Figure 4. The graph of the number of zero coefficients in the matrices of the 2 r -point DsiHTs.
Computers 15 00067 g004
Figure 5. The diagrams for calculating the 7-point DsiHT with (a) path #3 and (b) path #4.
Figure 5. The diagrams for calculating the 7-point DsiHT with (a) path #3 and (b) path #4.
Computers 15 00067 g005
Figure 6. The diagrams for calculating the 6-point DsiHT with (a) path #3 and (b) path #4.
Figure 6. The diagrams for calculating the 6-point DsiHT with (a) path #3 and (b) path #4.
Computers 15 00067 g006
Figure 7. The diagrams for calculating the 5-point DsiHT with (a) path #3 and (b) path #4.
Figure 7. The diagrams for calculating the 5-point DsiHT with (a) path #3 and (b) path #4.
Computers 15 00067 g007
Figure 8. The diagrams for calculating the 3-point DsiHT with (a) path #3 and (b) path #4.
Figure 8. The diagrams for calculating the 3-point DsiHT with (a) path #3 and (b) path #4.
Computers 15 00067 g008
Figure 9. The curves of the functions m H ( N ) and m # 1 ( N ) in the integer intervals (a) [2,512] and (b) [512,2048].
Figure 9. The curves of the functions m H ( N ) and m # 1 ( N ) in the integer intervals (a) [2,512] and (b) [512,2048].
Computers 15 00067 g009
Figure 10. The curves of the functions r 1 ( N ) and r 2 ( N ) .
Figure 10. The curves of the functions r 1 ( N ) and r 2 ( N ) .
Computers 15 00067 g010
Figure 11. The diagram for calculating the 5-point complex DsiHT with path #4.
Figure 11. The diagram for calculating the 5-point complex DsiHT with path #4.
Computers 15 00067 g011
Figure 12. (a) The original complex image A , (b) the complex image QNRN, and (c) the difference between the images.
Figure 12. (a) The original complex image A , (b) the complex image QNRN, and (c) the difference between the images.
Computers 15 00067 g012
Figure 13. The image of the matrix 2000 × | Q H | and the image of 3 × | R H | .
Figure 13. The image of the matrix 2000 × | Q H | and the image of 3 × | R H | .
Computers 15 00067 g013
Figure 14. (a) The complex image Q M R M and (b) the rounded image of Q H R H .
Figure 14. (a) The complex image Q M R M and (b) the rounded image of Q H R H .
Computers 15 00067 g014
Table 1. The angles of rotation in the matrices of the 4-point DsiHT.
Table 1. The angles of rotation in the matrices of the 4-point DsiHT.
ϑ 1 ϑ 2 ϑ 3
H 4 ; # 1 71.5651 °       32.3115 ° 53.1913 °
H 4 ; # 2       68.1986 °       60.8784 ° 80.7857 °
H 4 ; # 3 71.5651 °       68.1986 °       59.5777 °
H 4 ; # 4         63.4349 ° 59.0362 ° 69.0191 °
Table 2. Angles of rotations in the 8-point DsiHTs with paths #1, 2, 3, 4, and 5.
Table 2. Angles of rotations in the 8-point DsiHTs with paths #1, 2, 3, 4, and 5.
ϑ 1 ϑ 2 ϑ 3 ϑ 4 ϑ 5 ϑ 6 ϑ 7 #0
H 8 ; # 1 71.5651 ° 32.3115 ° 46.9113 °     20.0596 ° 9.7315 ° 26.8892 ° 37.0082 ° 21
H 8 ; # 2 59.0362 ° 80.2685 ° 71.3216 °     57.3599 ° 74.9075 ° 68.6660 ° 83.0856 ° 21
H 8 ; # 3 71.5651 ° 63.4349 ° 26.5651 ° 59.0362 ° 54.7356 °       69.0191 °     48.7474 ° 32
H 8 ; # 4       63.4349 ° 18.4349 ° 56.3099 ° 51.3402 ° 58.1939 ° 63.7169 ° 59.2859 ° 32
H 8 ; # 5 63.4349 ° 53.1301 ° 153.4349 ° 59.0362 ° 65.9052 ° 69.0191 ° 48.7474 ° 32
Table 3. Comparison of four matrices of the N -point DsiHTs where N is a power of 2.
Table 3. Comparison of four matrices of the N -point DsiHTs where N is a power of 2.
N z # 1 , 2 z # 3 , 4 Δ z N 2 z # 1 , 2 / N 2 × 100 % z # 3 , 4 / N 2 × 100 %
43411618.75%25%
82132116432.81%50%
161051767125641.01%68.75%
32465832367102445.41%81.25%
64195336481695409647.68%89.06%
128800115,360735916,38448.83%93.75%
25632,38563,23230,84765,53649.41%96.48%
512130,305257,024126,719262,14449.70%98.05%
1024522,7531,037,312514,5591,048,57649.85%98.93%
2048 2,094,081 4,169,728 2,075,647 4,194,304 49.93%99.41%
Table 4. The number of zeros and operations of multiplication by matrices of the N -point DsiHT.
Table 4. The number of zeros and operations of multiplication by matrices of the N -point DsiHT.
N 345678910 11 12 13 14 15 16
z ( N ) 148 14 223243567188107 128 151 176
μ ( N ) 812172227323844505662687480
N 2 9162536496481100121144169196225256
Table 5. Angles of rotations in the QR-factorization of the 5 × 5 matrix A.
Table 5. Angles of rotations in the QR-factorization of the 5 × 5 matrix A.
ϑ 1 ϑ 2 ϑ 3 ϑ 4
H 5 51.3402 ° 47.5498 ° 48.3665 ° 51.7676 °
H 4 42.7596 ° 1.1563 ° 48.9986 °
H 3 36.4314 ° 28.6623 °
H 2 78.0111 °
Table 6. Numbers of multiplications in the QR-factorizations of the N × N matrix.
Table 6. Numbers of multiplications in the QR-factorizations of the N × N matrix.
N 3 4 5 6 7 891011121314
m H ( N ) 35 99 224 440 783 12952024302443556083828011,024
m # 1 ( N ) 32 84 179 335 573 917139420342870393852776929
m # 4 ( N ) 32 80 165 297 486 742108415242074274635524504
N 128 256 512 1024 2048
m H ( N ) 6.81615 × 10 7 1.08215 × 10 9 1.7247 × 10 10 2.75415 × 10 11 4.40234 × 10 12
m # 1 ( N ) 3.51334 × 10 7 5.49478 × 10 8 8.6907 × 10 9 1.38245 × 10 11 2.20547 × 10 12
m # 4 ( N ) 5.35852 × 10 6 4.82302 × 10 7 4.2953 × 10 8 3.78943 × 10 9 3.31578 × 10 10
Table 7. The angles of the 5-point complex DsiHT.
Table 7. The angles of the 5-point complex DsiHT.
φ 0 ; k φ 1 ; k ϑ k k
A 1 45 ° 26.5651 ° 72.4516 ° 1
A 2 0 ° 38.6598 ° 53.7765 ° 2
A 3 123.6901 ° 18.4349 ° 41.2526 ° 3
A 4 0 ° 0 ° 31.1411 ° 4
Table 8. The angles of the DsiHT-based QR-factorization of A .
Table 8. The angles of the DsiHT-based QR-factorization of A .
φ 0 ; k φ 1 ; k ϑ k k
H 5 A 1 14.0362 ° 21.8014 ° 52.5608 ° 1
A 2 0 ° 164.0546 ° 47.0273 ° 2
A 3 20.5560 ° 12.5288 ° 47.1779 ° 3
A 4 0 ° 0 ° 51.6359 ° 4
H 4 A 1 48.3521 ° 12.4259 ° 23.6165 ° 1
A 2 148.9744 ° 70.1077 ° 7.5599 ° 2
A 3 0 ° 0 ° 46.4066 ° 3
H 3 A 1 106.5349 ° 107.2347 ° 42.6405 ° 1
A 2 0 ° 54.6890 ° 36.4034 ° 2
H 2 A 1 97.5470 ° 88.2841 ° 54.3345 ° 1
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Grigoryan, A.M. Fast Computation for Square Matrix Factorization. Computers 2026, 15, 67. https://doi.org/10.3390/computers15010067

AMA Style

Grigoryan AM. Fast Computation for Square Matrix Factorization. Computers. 2026; 15(1):67. https://doi.org/10.3390/computers15010067

Chicago/Turabian Style

Grigoryan, Artyom M. 2026. "Fast Computation for Square Matrix Factorization" Computers 15, no. 1: 67. https://doi.org/10.3390/computers15010067

APA Style

Grigoryan, A. M. (2026). Fast Computation for Square Matrix Factorization. Computers, 15(1), 67. https://doi.org/10.3390/computers15010067

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop