# Questions tagged [linear-algebra]

Questions on the algorithmic/computational aspects of linear algebra, including the solution of linear systems, least squares problems, eigenproblems, and other such matters.

1,124 questions
Filter by
Sorted by
Tagged with
16 views

### Help with inferring Network topology from Spectral templates

I am trying to use matlab and YALMIP to solve a graph learning problem of recovering eigenvalues from the eigenvectors of the covariance of sampled graph signal data. This is to implement the ...
68 views

### Are there any established direct eigensolvers for sparse hermitian matrices?

I have experience with LAPACK (direct solvers) and ARPACK (sparse iterative solvers), but are there any sparse direct solvers? I am concerned more with preserving space than with fast solutions. ...
1 vote
43 views

### Finding the Vector $v$ for a Given Householder Matrix Transformation of Non-Collinear Vectors $a$ and $b$

Consider a vector $v$ in $\mathbb{R}^{n\times1}$. The Householder matrix is defined as follows: $$H(v)=I-\dfrac{2vv^T}{v^Tv}.$$ It can be demonstrated that $H(v)$ is symmetric and orthonormal. The ...
42 views

### How to use a preconditioner estimated from a subset of data?

Suppose I'm solving $Ax=b$ using row-action method like Kaczmarz for $m\times n$ matrix A with $m\approx \infty$ and have $H_k=\frac{1}{k}A_k^T A_k$ which is an estimate of the Hessian obtained from ...
184 views

### Solving underdetermined Lyapunov equation?

I'm solving the following for $X$ with $A,B$ singular positive semidefinite matrices. $$AX + XA = B$$ Because $A$, $B$ are singular, standard Lyapunov solver fails However, if I heuristically skip ...
16 views

1 vote
61 views

### Dyadic product of a Gaussian vector (in Convolution kernel)

I was reading about the 2D Gaussian-blur convolution kernel. A Gaussian vector is a vector where the elements follow a Gaussian distribution. In my case, the kernel is symmetric and hence we take a ...
2k views

### Why are systems with clustered eigenvalues easy to solve?

I came across the following slide by Theo Diamandis & Zachary Frangella on what makes the linear system $Ax=b$ easy to solve using the conjugate gradient method. Transcription: CG converges ...
179 views

### Problems on the algebraic theory of sparse matrices

I have finished testing basic large densely parallel matrix multiplication on 4 gpu's ,and have done work on TSLU and TSQR on cpu's based on mpi. I am going to continue working on the theory of ...
300 views

### How to efficient solve $e^{-tA} x =b$, where A is a very sparse matrix

I am going to solve an equation containing an exponential matrix $e^{tA} x =b$, which can be obtained naturally through $x=e^{-tA} b$. A is a 1million $\times$ 1 million matrix with stores 7.15 ...
257 views

### Questions on the theory of distributed numerical algebraic computation

I'm trying to build a pure python distributed numerical algebra computation kernel based on GPU. but after I've learnt most of the software engineering, I realise that I'm seriously lacking in ...
143 views

### Estimating the spectral radius when applying the method of lines

Some time integrators, notably the Runge-Kutta-Chebyshev method, implemented in the RKC code from Sommeijer & Verwer, gives the user an option to provide a callback with an estimate of the ...
45 views

### recommendation on some papers/books about frontal solver used in FEM

I'm reading a program about computational plasticity, this program use frontal solver to solve the program, but I'm not familiar with frontal solver even after reading some papaers, so could you ...
44 views

### How do you build a polyharmonic discrete system?

Polyharmonic equations, to my understanding, are defined as: $$\Delta ^k u = 0$$ i.e. one repeatedly applies the laplace operator to the function a certain number of times and the result must be 0. ...
99 views

### Numerical continuation of all eigenvalues of small, dense matrices

Consider a one-parameter family of matrices $A(q)\in \mathbb{R}^{n\times n}$, $q\in\mathbb{R}$. For my applications, $n$ is typically between $5$ and $50$ and $A(q)$ is generally dense, so direct ...
85 views

### Computing discrete laplacian matrix for mesh fairing

I asked this question on the math stack exchange and got an answer, but I am just as utterly confused as before. My fundamental goal is to actually construct the matrix, that is, a series of steps I ...
9k views

### stupid + stupid = brilliant in scientific computing

I'm interested in examples of very effective methods in scientific computing that are the sum or naive combination of very ineffective or bad ones.
44 views

### Different computational approaches to show that the conjecture is true

It seems that proving the statement given in the question https://math.stackexchange.com/questions/4601532/a-pen-and-paper-proof-for-a-matrix-implication is difficult analytically. I was thinking what ...
1k views

### Why are all eigen solvers iterative?

I have small dense square matrices for which I would like to compute the inverse by singular value decomposition, or equivalently solve the eigenvalue problem. While there are many direct methods for ...
65 views

### Solve bivariate polynomial system

Given a bivariate polynomial system with variables $(x, y, z)$ like (1) $f_1 = x * a_1 + y * a_2 + z * a_3 = 0$ (2) $f_2 = x * a_4 + y * a_5 + z * a_6 = 0$ (3) $f_3 = x^2 + y^2 - 1 = 0$ how do I ...
281 views

### Stable alternatives to "condition number"?

A number of numerical problems are easy to solve when condition number $\kappa$ of the problem is low. For instance, conjugate gradient descent complexity scales as $O(\sqrt{\kappa})$. However "...
56 views

### Matrices that achieve worst-case $LDL^T$ element growth

Matrices that achieve the worst case $\rho_n = 2^{n-1}$ element growth in LU factorization with partial pivoting are known; see e.g. Theorem 9.7 in Higham, Nicholas J., Accuracy and stability of ...
47 views

### How do compute lowest eigenvalue using Arpack in C language

Hi I have a problem to calculate lowest eigenvalue in non-symmetric matrix using Arpack, because my matrix is very complicated and even I have a lot of trouble to made a matrix - vector multiplication....
1 vote
31 views

### How to find the formula of a projected circle in a pencil of conics structure?

Hi this is my first question on the platform so feel free to comment if I have a mistake regarding the question. I'm working on an ellipse detection scheme in which I have markers consisted of 3 ...
132 views

Suppose $A$ is an $m\times n$ matrix with $\operatorname{Tr}(AA^T)=1$. Let $\sigma_i$ be the vector of singular values of $A$. How would I cheaply estimate the following quantity? $$\rho(A)=\sum_i \... 3 votes 0 answers 117 views ### When would one choose un-pivoted LDL^T instead of LL^T for a Positive Definite Matrix? Background I am decomposing (and then operating on) a symmetric positive definite matrix (a covariance matrix) as part of a larger system. Dimensions range from O(10) to O(300). The covariance ... 1 vote 0 answers 75 views ### Optimal Krylov subspace dimension and iteration limits for eigs When using the eigs function in MATLAB, which is based off of ARPACK, one can manually modify the maximal dimension of the constructed Krylov subspaces, the maximum iteration counts, and the error ... 2 votes 1 answer 83 views ### Tools to compare two matrices with same dimensions Context: I have two 3D non-random matrices that have the same dimensions. These matrices represent satellite images with 1 band, so their values are strictly positive. They both present areas that ... 1 vote 0 answers 63 views ### min(f(x)) is convex or concave based on type of f(x) i have f(x) that is concave function. My question is g=min(f(x)) is concave or convex? And max(g) is concave or convex? there is a theorem for this? 2 votes 1 answer 144 views ### Measuring the extent to which two sets of vectors span the same space I have a set of measurements y_i, 1 \leq i \leq N, and I want to model these measurements with a linear model. I have two possible models I can use,$$ y \approx A c $$and$$ y \approx B d $$... 3 votes 1 answer 197 views ### Generalized eigenvalue problem for large, potentially ill-conditioned systems Say that I have a generalized eigenvalue problem of the form$$Ax=\lambda Bx.$$Using MATLAB, some naive ways that one may solve this is by either directly inverting B then applying the ... 1 vote 0 answers 64 views ### How to show that the solution of the following quadratic programming is non-negative I have the following quadratic problem: max a^Tx+0.5x^TAx s.t: 1^Tx=1 in which a=[a_1, a_2,...,a_n] is a non-negative vector, and 1^T=[1,1, ..., 1]. The hessian matrix A has the ... 11 votes 1 answer 1k views ### Is using iterative methods to solve a linear system always superior to inversing the matrix? I have a silly question. Is it always more computationally efficient to use iterative methods to solve for some matrix A, Ax=b, where x and b change but A stays constant, compared to ... 2 votes 0 answers 68 views ### When is Lanczos tridiagonalization accurate? Suppose that we are given a random, symmetric matrix A, and a random vector q. For concreteness, assume the dimensions of q and A are both 1,000. I would like to use the Lanczos algorithm to ... 1 vote 0 answers 46 views ### Interpreting iterative smoothers and solvers as krylov preconditioners Various literature and library implementations like petsc use preconditioners based on simple smoothers that themselves could be used the solve the systems directly. e.g. say I have a function ... -1 votes 1 answer 26 views ### How to generate p Sample of GGM of dimension m, for parameter : the weight, the means and the covariance? after searching in the python numpy, scipy and sklearn module, there is no function who can generate p samples of a gmm (gaussian mixture model) for parameter means, covariances and the weight of each ... 1 vote 1 answer 144 views ### QR algorithm for eigenvalues and eigenvectors of large symmetric matrices I am trying to write a QR algorithm in Python for eigenvectors and eigenvalues finding for large symmetric matrices, My initial thought was to use Householder transformation with a Wilkinson shift on ... 2 votes 1 answer 170 views ### Numerically stable way to implement Cramer's rule analog Problem statement Let A be an n\times n matrix and b an n-dimensional vector. For j\in \{1, \dots, n \}, let A_j be the matrix where we take A and replace the j^{\rm th} column with b... 0 votes 0 answers 56 views ### Rank-one updates for symmetric matrix eigen-system Are there existing implementations for rank-one updating of symmetric matrices eigensystems? This is the mathematical statement of the problem. Let S=QDQ^T$$S + vv^T = QDQ^T +vv^T = Q_{new}D_{new}...
56 views

Suppose the original loss function is $$\min_{\mathbf{V}}\frac{1}{2}\|\mathbf{V} - Q(\mathbf{V})\odot\mathbf{U}\mathbf{E} - \beta Q(\mathbf{V})\mathbf{V}\|_2^2$$ where $\odot$ denotes the element-wise ...
73 views

### Compute a series of matrix multiplications and matrix norms quickly in Python

I need to compute a series of matrix multiplications involving 3x3 matrices and a series of matrix norms also involving 3x3 matrices and I wonder how I can set these computations up with numpy such ...
231 views

### Eigenvalues of a $d\times d$ diagonal+rank1 matrix in $O(d)$ time?

Suppose $h$ is a vector of $d$ positive numbers adding up to 1. I'm looking for a $O(d)$ algorithm to estimate eigenvalues of the following diagonal + rank1 matrix: $$A=2\operatorname{diag}(h)-hh^T$$ ...
36 views

### Matrix for Marker and Cell grid?

I have an assignment question that reads: Show that the combined matrix for the Marker and Cell (MAC) grid for velocity and pressure for the steady Stokes equations is symmetric. You can consider the ...
174 views

### Solution of linear system doesn't work, in parallel

I'm solving $Ax = b$ with PETSc, $A$ sparse and asymmetric. I'm using BCGS or FGMRES or TFQMR as a solver, and ILU as a preconditioner. When I use 1 core, everything works as expected. But with 8 ...
132 views

### The error propagation in calculating the inverse using a matrix decomposition

I have been trying to calculate the matrix inverse of some large matrix with entries ranging by orders of magnitude. I tried to use the matrix decomposition to simplify the computation, where a matrix ...