Questions tagged [dense-matrix]
The dense-matrix tag has no usage guidance.
46
questions
1
vote
0answers
49 views
performance comparison between PETSc and SLATE
We want to start a new project to solve a large-scale inverse problem (O(10^6) number of parameters) to invert for subsurface wave speeds. We will use FEM to solve forward and adjoint PDEs. In our ...
4
votes
1answer
72 views
Trace of inverse from LU decomposition
Given an LU decomposition of $A\in \mathbb{R}^{n\times n}$, is there a way to compute $\operatorname{trace}(A^{-1})$ with lower complexity than that of the inversion ($O(n^3)$ in practice)?
This ...
7
votes
2answers
280 views
Is there an iterative solver for dense matrices with possible zero diagonal entries?
Is there an iterative solver that can handle potentially zero entries on the central diagonal? I am implementing a polynomial fitting algorithm (up to $10^{th}$-order) and my matrix is a "...
0
votes
1answer
62 views
Library to solve dense linear system with GMRES
I have a fortran 90 code and I want to solve a dense linear system with GMRES. I would prefer the restarted GMRES with preconditioning. Is there some library that you know of that I could use? Now I ...
3
votes
0answers
19 views
Barrier algorithm Gurobi and interior-point quadprog; what kind of matrices can it handle the best (sparse or dense, large or small problems)?
I am trying to solve a QP problem.
Does anybody know the differences between the interior-point-convex algorithm of quadprog and the barrier method of Gurobi in terms which kind of matrices can the ...
4
votes
0answers
80 views
Block matrix and DSYRK
I want to compute the matrix
$$
A = \sum_{i=1}^N v_i v_i^T
$$
where each $v_i$ is a given vector of length $2500$, so that $A$ is $2500 \times 2500$, and my $N$ is about 2 million. Rather than call ...
4
votes
1answer
200 views
Fast matrix multiplication with matrix elements computed on-the-fly (without forming the matrix)
Is there any library or routine for high-performance matrix-matrix product, where the matrix elements are computed on-the-fly using a given function of $i$ and $j$?
More specifically, in the problem ...
13
votes
3answers
2k views
Rule of thumb for sparse vs dense matrix storage
Suppose I know the expected sparsity of a matrix (i.e. the number of non-zeros / total possible number of non-zeros). Is there a rule of thumb (perhaps approximate) for deciding whether to use sparse ...
6
votes
2answers
263 views
inertia count sparse matrix with dense low-rank perturbation
I would like to determine the number of negative eigenvalues (inertia count) of the $(N \times N)$ symmetric real matrix $K - \sigma M$, with $K$ a positive-definite sparse matrix and $M$ a positive-...
7
votes
2answers
719 views
Why does sparse linear algebra have a low arithmetic intensity?
I often see the terms "low arithmetic intensity" and "memory-bound" associated with sparse matrix operations. However, my intuition is that a sparse matrix operation should be less memory-bound, if ...
10
votes
2answers
778 views
Matrix exponential of a Hamiltonian matrix
Let $A, G, Q$ be real, square, dense matrices. $G$ and $Q$ are symmetric. Let
$$H = \begin{bmatrix} A & -G \\ -Q &-A^T \end{bmatrix}$$
be a Hamiltonian matrix. I want to compute the matrix ...
1
vote
1answer
56 views
Optimal algorithm choice for mixed diagonal/dense problem
$$
\text{Let}\\
A, B \in \mathbb{C}^{n \times n} \text{ and } \hat{\alpha}, \hat{\beta} \in \mathbb{C}^{n}, \hat{f} \in \mathbb{C}^{2n}
\\
\text{Find }\\
\underline{\mathbf{x}} \in \mathbb{C}^{2n} \...
1
vote
0answers
61 views
Parallel dense solve with submatrices from mesh refinement with Petsc
For a Bounday Element Method problem I require the solution of a system of linear equations with multiple right-hand sides. Though this is a dense system, I still want to do it via Petsc in parallel. ...
1
vote
1answer
178 views
GPU libraries for integer matmul | overflow tolerated
Are there any high performance integer BLAS libraries that implement matrix multiplication i.e. i32gemm and i64gemm ? I need to use them for a cryptographic application and can tolerate overflows, i.e....
0
votes
1answer
100 views
Need clarification on a piece of book excerpt about spectral element method!
I am reading "Using MPI (3rd edition)" from William Gropp, where in chapter 4 application section 4.13, it introduces an MPI application Nek5000/NekCEM which is based on spectral element method (SEM) ...
1
vote
2answers
499 views
Comparison between two matrices
I have a large dense matrix $A$. For simplicity in simulation purposes and application demand, I induced sparsity by replacing lower/insignificant values by zero and reordering it in block diagonal ...
1
vote
2answers
165 views
How is the dense system usually dealt with in spectral method?
Unlike finite element (FEM) or finite difference methods (FDM), where the original PDE is transformed into a sparse linear system, spectral methods return a dense linear system. For a large system, it'...
4
votes
2answers
917 views
Smart way to multiply 3 matrices
I have a quantum mechanics simulation where I need to multiply three matrices that look like this:
$$\rho(t_1)=U^\dagger \rho(t_0) \, U$$
where $U^\dagger$ is the hermitian conjugate of $U$. This ...
2
votes
2answers
823 views
Compute all eigenvectors and eigenvalues of small symmetric matrices
My problem is to compute eigenvectors and eigenvalues of a lot of small (n < 30) symetric, positive definite matrices.
So far I am using LAPACK's DSYEV.
The priority is speed more than accuracy. ...
0
votes
1answer
105 views
Discretized matrix from the integral kernel function
Recently, I read a paper [1] and then I want to handle the two-dimensional linear integro-differential equation
\begin{equation*}
-\triangle u + q\Big(\frac{\partial u}{\partial x} + \frac{\partial u}{...
1
vote
1answer
577 views
Preconditioning of two step iteration for dense matrices
I would like to solve a dense linear system the form in python
$$
L\left(\boldsymbol{x}\right):=\left[\gamma^+\left[\boldsymbol{A}+\frac{1}{2}\boldsymbol{B}^{-1}\right]
+\gamma^-\left[\boldsymbol{A}-\...
12
votes
2answers
8k views
Complexity of matrix inversion in numpy
I am solving differential equations that require to invert dense square matrices. This matrix inversion consumes the most of my computation time, so I was wondering if I am using the fastest algorithm ...
1
vote
2answers
949 views
Parallelization of element-wise matrix multiplication
I use Armadillo as an interface to OpenBLAS. In my current program, I have a loop, in which I do multiplications of the form
...
9
votes
6answers
11k views
Super C++ optimization of matrix multiplication with Armadillo
I'm using Armadillo to do very intensive matrix multiplications with side lengths $2^n$, where $n$ can be up to 20 or even more. I'm using Armadillo with OpenBLAS for matrix multiplication, which ...
2
votes
2answers
2k views
Solve large dense positive-definite linear system
Which method should I choose to solve a large (~20 000 variables) dense symmetric positive-definite, possibly ill-conditioned, system of linear equations?
The system will be solved for two vectors. I'...
0
votes
1answer
122 views
Help me analyze the computational cost of two kinds of operations
everyone, I have a question about computational costs for a algorithm. That is:
I have two vectors $u_n,\ v_n\in \mathbb{C}^N$, a matrix $A\in \mathbb{C}^{N\times N}$ (can be both sparse and dense) ...
3
votes
3answers
773 views
Large overdetermined system of linear equations
I'm looking for a method to solve a large overdetermined system of linear equations in a least squares sense. The matrix is dense.
I'd like to use a method that works even with limited memory (we can'...
6
votes
1answer
558 views
Efficient RQ decomposition
I have an upper trapezoidal matrix stored in column major format. That is, my matrix looks like this:
I'd like to RQ decompose it, and store Q in the rectangular part of my upper trapezoidal matrix. ...
3
votes
1answer
1k views
Fast way to compute all eigenvalues of a dense Hermitian matrix
I am finding the eigenvalues of dense NxN Hermitian matrix which is calculated from a density operator in quantum physics. All the eigenvalues are needed as I need to calculate the sum of the absolute ...
5
votes
2answers
397 views
Spectral decomposition of symmetric matrix
What is a good direct method to compute the spectral decomposition / Schur decomposition / singular decomposition of a symmetric matrix?
"Direct" means as in LU decomposition, Cholesky decomposition, ...
1
vote
2answers
178 views
Rearrange a dense distance matrix to a 2x2 non-perfect block diagonal form
I have a distance matrix (square, symmetrical, non-negative, dense).
I want to split the objects into two well-connected groups.
Mathematically speaking, I want to group (re-arrange) the rows/columns ...
2
votes
3answers
264 views
Dense distributed matrix
A dense matrix is distributed for parallel computation column-wise, then multiplied from left & right by sparse matrices. What would be appropriate c++ libraries for these tasks?
5
votes
1answer
141 views
Computing eigendecomposition of a Hermitian matrix that is almost unitary
I have a dense Hermitian matrix that is approximately unitary, so it has eigenvalues that are $\sim \pm1$. I would like to compute all the eigenvectors corresponding to the $+1$ eigenvalue (not ...
1
vote
0answers
95 views
Is it possible to construct such a symmetric matrix with desired eigenvalues?
Suppose a real, dense and asymmetric square matrix $A\in\mathbb{R}^{n\times n}$,
all its eigenvalues $\lambda_i \in \mathbb R$
Is it possible to construct a symmetric matrix $B\in\mathbb{R}^{n\times ...
2
votes
0answers
59 views
Are the eigenvalues of the product matrix of two real symmetric square matrices also real values?
Suppose $A,B \in \mathbb{R}^{n\times n}; A=A^T, B=B^T$, let $C = AB, D =BA$,
If we have all the real eigenvalues of $A$ and $B$, e.g. the eigenvalue decomposition of them:
$A=P\Lambda_1 P^T$,
$B=Q\...
1
vote
1answer
1k views
How can I reuse the SVD of matrix A to solve LS problems for both A and its transpose via Eigen C++?
If $A\in R^{m\times n}, b\in R^m, c\in R^n$,
if I need to solve the least square problems via SVD of $A$ and $A^T$, i.e.
I need to solve the least square solutions to following linear systems via ...
9
votes
1answer
3k views
full rank update to cholesky decomposition
Let $A$ be a real, symmetric, positive definite matrix. It has at least 500 rows, possibly much more. I compute its Cholesky decomposition, which allows me to calculate
$det(A)$
$A^{-1}X$ for some ...
4
votes
1answer
597 views
LU Decomposition of PSD Matrix + Diagonal Matrix
If I have a psd, symmetric matrix $\mathbf{A}$ and I need to do LU decomps on $\mathbf{B_i}= \mathbf{A} + \mathbf{D_i}$ (where $\mathbf{D_i}$ is a diagonal psd matrix, where $\mathbf{D_i}$ changes ...
3
votes
3answers
133 views
Smoothly varying dense matrices arising from computational science
I have written an algorithm to solve a dense system with smoothly varying entries. This means I assume there is no large jump from any entry to its neighbors.
I would love to use real-application-...
5
votes
2answers
562 views
What are the most common dense matrix storage formats?
I'm looking to write some code to read in a dense matrix from a file, and I was wondering what are the most common storage formats that my code should support?
3
votes
2answers
132 views
Computing sparse matrix products into a dense result
I need to assemble a matrix (in dense form, of moderate size, say dimension 1000) which is most easily expressed as the product of several (4) sparse matrices. These matrices are most easily expressed ...
5
votes
3answers
6k views
Algorithm for Principal Eigenvector of a Real Symmetric 3x3 Matrix
I have a 3x3 covariance matrix (so, real, symmetric, dense, 3x3), I would like it's principal eigenvector, and speed is a concern. Is there a fast algorithm for this specific problem? I've seen ...
7
votes
4answers
2k views
computing the determinant of a dense nonsymmetric 100x100 matrix having very big and very small eigenvalues
The motivation for my question is the following: in one of Project Euler questions there is a need to count the spanning trees of a rectangular grid graph of dimension 100x500. By the Matrix-Tree ...
11
votes
1answer
813 views
Solving huge dense linear system?
Is there any hope in solving the following linear system efficiently with an iterative method?
$A \in \mathbb{R}^{n \times n}, x \in \mathbb{R}^n, b \in \mathbb{R}^n \text{, with } n > 10^6$
$Ax=...
10
votes
2answers
761 views
Diagonalization of Dense Ill Conditioned Matrices
I am trying to diagonalize some dense, ill-conditioned matrices. In machine precision, results are inaccurate (returning negative eigenvalues, eigenvectors do not have the expected symmetries). I ...
5
votes
2answers
740 views
Largest invertible dense matrix with standard solvers such as Lapack
I have a matrix which is complex symmetric. It is around 50,000 elements per side. It is a Method of Moments matrix. Is it feasible to use a standard direct solver such as Lapack to do a matrix ...