# 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.

942 questions
Filter by
Sorted by
Tagged with
50 views

### How to pass matrices to parallel workers quickly in matlab?

I am trying to solve many different linear systems in parallel in matlab. The problem is, each linear system has entirely different parts and are fairly large, so passing the information to each of ...
94 views

### Sparse matrix inversion

I have the impedance matrix $Y$, formulated from an electrical network by augmented nodal analysis. The matrix $Y$ is shown as an image to illustrate its feature visually, where all the white blocks ...
55 views

### numpy.outer without flatten

$x$ is an $N \times M$ matrix. $y$ is a $1 \times L$ vector. I want to return "outer product" between $x$ and $y$, let's call it $z$. z[n,m,l] = x[n,m] * y[l] ...
73 views

### what does “D = diag(W.1)” means?

, what does “D = diag(W.1)” means?on page #2, just below equation (6) PFA screenshot and here is the link of the paper - original paper
209 views

### Fast algorithm for computing cofactor matrix

I wonder if there is a fast algorithm, say ($\mathcal O(n^3)$) for computing the cofactor matrix (or conjugate matrix) of an $N\times N$ square matrix. And yes, one could first compute its determinant ...
103 views

### Null space for smoothed aggregation algebraic multigrid

I do not really get the point of null space usage for creating the prolongation operator for smoothed aggregation algebraic multigrid. I know what the null space is per definition and I know that the ...
130 views

Consider the regularized least squares problem $$\min_x || b - A x ||^2 + \lambda^2 ||x||^2$$ which is equivalent to $$\min_x \left|\left| \pmatrix{b \\ 0} - \pmatrix{A \\ \lambda I} x \right|\... 1answer 145 views ### Complex differentiation of linear solvers I have a linear system$$Ax=b$$which I'm solving approximately, and I need to take the frechet derivative of x with respect to z. Were I solving the problem exactly (either analytically or to machine ... 1answer 139 views ### Optimality of block-Jacobi preconditioner For a dense N \times N matrix A, is the block-Jacobi preconditioner comprising the inverse of the diagonal blocks of A the optimal block-diagonal preconditioner? Could there exist another matrix ... 0answers 54 views ### Kinetic preconditioning Publication arXiv:0804.2583 describes a method for doing self-consistent iteration without having to diagonalize the Hamiltonian operator at every step. IX. PRECONDITIONING As already mentioned, ... 0answers 33 views ### A preconditioner for self-consistent iteration I tried to derive a preconditioner for self-consistent iteration similar to section IX in arXiv:0804.2583. For simplicity, consider here only one orbital (one or two electrons) systems. Suppose that ... 1answer 101 views ### Whitening transformation does NOT return a unit covariance matrix For this question, I am using the following Wiki definition of Matrix whitening: Suppose X is a random (column) vector with non-singular covariance matrix \Sigma and mean 0. Then the ... 1answer 149 views ### In iterative methods, are matrix decompositions considered useful for implementation? When we study an iterative method from textbooks, for example, see the Gauss-Seidel Method, the given matrix is decomposed with suitable splittings. In the example, A = L+U. So we can proceed with ... 2answers 382 views ### Python: vectorizing a structured linear system solve Overview I am looking for a way to solve a structured linear system in Python without using a for loop (preferably using vectorization, if possible). Background Consider the following linear system:... 1answer 132 views ### Re-using LU factorization within iterative (?) setup for a sum of two matrices So, I would love to make at least some use of my preexisting data, no matter how small, and just out of ideas. Maybe I am just a prisoner of a Kahneman-like theatre-ticket paradox, and don't know ... 1answer 198 views ### Accurate way of getting the square root inverse of a positive definite symmetric matrix What is the most accurate algorithm to get the square root inverse of a positive definite symmetric matrix? I am not looking as much for efficiency, though using quadruple precision computation is out ... 2answers 296 views ### Compiled c++ code runs much faster with double than float. Explanation? I am still rather new on here and I hope question is suitable for this forum otherwise please help me migrate it to greener pastures. I am an electrical engineer specializing in applying mathematics ... 1answer 140 views ### CHOLMOD condition number estimate The CHOLMOD library provides a CHOLMOD_rcond function that estimates the reciprocal condition number (in the one norm) of a symmetric positive definite matrix from ... 2answers 77 views ### How to efficiently invert K \otimes M+I_T\otimes \Sigma? I'm looking for a way to efficiently invert$$K \otimes M+I_T\otimes \Sigma$$where the inverses for M,K exist. I_T is the identity matrix of dimension T, and \Sigma is a diagonal matrix, with ... 1answer 39 views ### Discretization with non-constant matrix containg entries form unknown vector Consider a system of PDEs$$ \begin{cases} u_t = \nabla \cdot (D(u)\nabla u) + \frac{c}{K_U+c}u-ku\\ c_t = d_c\Delta c -\frac{\nu_U c}{K_U + c}u \end{cases} $$with some boundary conditions. Here, D(... 18answers 9k views ### Good examples of “two is easy, three is hard” in computational sciences I recently encountered a formulation of the meta-phenomenon: "two is easy, three is hard" (phrased this way by Federico Poloni), which can be described, as follows: When a certain problem is ... 0answers 45 views ### Stability of SVD, Eigendecompositions, and pseudoinverse procedures in modern LAPACK routines I have proposed an optimisation algorithm which I claim has improved upon the previous algorithm in a number of ways. One of these claims is that my proposed solution requires no explicit SVD and ... 1answer 80 views ### How to add extra constraints to a linear system for probabilities？ Background： I have an equation which looks like as follows: W \times P = R$$\left[\begin{array} &{1}&{0}&{0}&-\frac{w_{1}}{w_{o1}} &\dots &{0} &-\frac{w_{1}}{w_{0} } \...
79 views

I have a matrix $A\in\{0,1\}^{d\times n}$ and $rank(A)=d,d<n$, and another matrix $X\in \mathbb{R}^{d\times n}$, but I do not know the rank of $X$. What can we say about the rank of their Hadamard ...
95 views

### How to compute the determinant of Hessian of a multivariable function?

I have a function $F(\vec x)$ of many variables (let's say in the order of hundreds of thousands). I need to compute the determinant of the Hessian matrix at the point $x_0$. Is there a way to ...
183 views

97 views

### Connection between piecewise linear basis functions and RELU activation function

ReLU activation is defined as follows $$\sigma(x)=\max(0, x).$$ Let's assume that I have deep network of 1 hidden layer, than output from my layer has form $$f(x)= \sigma(Wx +b),$$ where matrix W ...
134 views

### Gaussian Elimination Using Fortran [closed]

I developed the code below for performing gaussian elimination in order to evaluate the determinant of a matrix: ...
72 views