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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
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 ...
user86422's user avatar
0 votes
1 answer
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. ...
DJames's user avatar
  • 405
1 vote
1 answer
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 ...
Ilkay Burak's user avatar
2 votes
0 answers
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 ...
Yaroslav Bulatov's user avatar
3 votes
1 answer
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 ...
Yaroslav Bulatov's user avatar
0 votes
0 answers
16 views

How do you determine the Mott-Insulator to Superfluid transition in the Bose Hubbard System

I am doing some simulations on various systems expressed in 2nd quantization and one of the points of interest of mine was Phase transitions in the Bose-Hubbard model $$ H = \sum_{k} \{ t_k(b^\dagger_{...
Mephistopheles Faust's user avatar
2 votes
1 answer
82 views

enough conditions to check that a matrix doesn't have Cholesky factorization while factorizing it

I wrote this code to find Cholesky factorization of a symmetric positive definite matrix in MatLab: ...
Ilkay Burak's user avatar
3 votes
0 answers
112 views

Stochastic power iteration for generalized eigenvalue problems?

Suppose $\mathbf{x}$ is a random variable in $n$ dimensions, and $u$ is a vector. How can I estimate the following quantity in an online fashion? $$f(x)=\max_{\|u\|=1} \frac{ E\left[\langle u\cdot x\...
Yaroslav Bulatov's user avatar
1 vote
1 answer
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 ...
SKPS's user avatar
  • 171
12 votes
2 answers
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 ...
Yaroslav Bulatov's user avatar
0 votes
1 answer
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 ...
Haitao Xiao's user avatar
4 votes
1 answer
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 ...
Owen Jun's user avatar
0 votes
1 answer
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 ...
Haitao Xiao's user avatar
3 votes
1 answer
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 ...
IPribec's user avatar
  • 544
0 votes
0 answers
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 ...
吴yuer's user avatar
  • 151
0 votes
1 answer
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. ...
Makogan's user avatar
  • 263
4 votes
1 answer
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 ...
whpowell96's user avatar
  • 2,054
0 votes
1 answer
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 ...
Makogan's user avatar
  • 263
38 votes
10 answers
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.
Daniel Shapero's user avatar
0 votes
0 answers
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 ...
BAYMAX's user avatar
  • 229
4 votes
1 answer
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 ...
Aurelius's user avatar
  • 2,355
0 votes
1 answer
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 ...
Citizen3011's user avatar
8 votes
0 answers
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 "...
Yaroslav Bulatov's user avatar
3 votes
1 answer
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 ...
Federico Poloni's user avatar
0 votes
0 answers
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....
Maciej Lewkowicz's user avatar
1 vote
0 answers
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 ...
kemal alperen cetiner's user avatar
5 votes
1 answer
132 views

Estimating the sum of 4th powers of singular values?

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 \...
Yaroslav Bulatov's user avatar
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 ...
Damien's user avatar
  • 792
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 ...
user45844's user avatar
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 ...
Nihilum's user avatar
  • 121
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?
Maria's user avatar
  • 11
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 $$ ...
vibe's user avatar
  • 1,048
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 ...
user45844's user avatar
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 ...
user45682's user avatar
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 ...
Touko Puro's user avatar
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 ...
miggle's user avatar
  • 41
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 ...
Aurelius's user avatar
  • 2,355
-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 ...
Loca's user avatar
  • 1
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 ...
Daniel's user avatar
  • 11
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$...
Joe's user avatar
  • 31
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}...
Sandeep Mukherjee's user avatar
0 votes
1 answer
56 views

The row loss gradients

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 ...
Zuba Tupaki's user avatar
0 votes
1 answer
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 ...
Mantabit's user avatar
  • 121
7 votes
1 answer
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$$ ...
Yaroslav Bulatov's user avatar
0 votes
0 answers
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 ...
Makogan's user avatar
  • 263
2 votes
1 answer
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 ...
hahn76's user avatar
  • 243
4 votes
1 answer
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 ...
ShoutOutAndCalculate's user avatar
2 votes
0 answers
97 views

Can we get the exact solution of large-scale quadratic programming problems (quadratic objective, linear inequality constraints) using KKT condition?

Crossposted at MathOverflow Consider a quadratic programming problem with the following format: $$ \text{min} Q(x) = c^Tx+\frac{1}{2}x^TDx \\ $$ $$ \text{s.t.} Ax\leq b, \\ x\geq 0 $$ where $D$ is a $...
ximeng fan's user avatar
2 votes
0 answers
132 views

Does exact diagonalization of a matrix allow for efficient computation of a Lanczos basis?

Suppose that we are given a large, real-symmetric matrix $L$, which is simply too large to perform exact diagonalization on numerically. If we want to study its spectrum, one tool we can use is the ...
miggle's user avatar
  • 41
3 votes
1 answer
468 views

Time and memory required to diagonalize a 18000 by 18000 matrix using numpy in python

Can someone give an estimate of the Time and memory required to diagonalize a 20000 by 20000 complex hermitian matrix using numpy in python ?
Snpr_Physics's user avatar

1
2 3 4 5
23