# Questions tagged [matrix]

Matrix is a rectangular array of elements (e.q. numbers, symbols, or expressions), arranged in columns and rows.

47 questions
Filter by
Sorted by
Tagged with
1k views

### Estimation of condition numbers for very large matrices

Which approaches are used in practice for estimating the condition number of large sparse matrices?
2k views

### Why can't Householder reflections diagonalize a matrix?

When computing the QR factorization in practice, one uses Householder reflections to zero out the lower portion of a matrix. I know that for computing eigenvalues of symmetric matrices, the best you ...
16k views

### Dealing with the inverse of a positive definite symmetric (covariance) matrix?

In statistics and its various applications, we often calculate the covariance matrix, which is positive definite (in the cases considered) and symmetric, for various uses. Sometimes, we need the ...
941 views

### Practical example of why it is not good to invert a matrix

I am aware about that inverting a matrix to solve a linear system is not a good idea, since it is not as accurate and as efficient as directly solving the system or using LU, Cholesky or QR ...
319 views

### What guidelines should I use when choosing a scalable linear solver?

There are many different linear solvers, some which work best for diagonally dominant matrices, some for symmetric, some for positive definite ones, some for banded matrices, etc... There are direct ...
2k views

### What's the current state of the art regarding algorithms for the singular value decomposition?

I'm working on a header-only matrix library to provide some reasonable degree of linear algebra capability in as simple a package as possible, and I'm trying to survey what the current state of the ...
2k views

### Why isn't my Matrix-Vector Multiplication Scaling?

Sorry for the long post but I wanted to include everything that I thought was relevant in the first go. What I want I am implementing a parallel version of Krylov Subspace Methods for Dense Matrices....
509 views

### Perturbation of Cholesky decomposition for matrix inversion

I am looking for a computationally cheap way to compute $x$ such that $$(L L^T + \mu^2 I)x = y$$ where $L \in \mathbb{R}^{n \times n}$ is a lower triangular definite positive matrix (with some very ...
250 views

### Eigenvector with maximum overlap

Given a matrix $M$ and a vector $v$, is there an efficient method to find the normalized eigenvector of $M$ that is closest to $v$, in that it has maximal overlap. More explicitly, a vector $v$ can be ...
2k views

### How is the SVD of a matrix computed in practice

How does MATLAB, for instance, calculate the SVD of a given matrix? I assume the answer probably involves computing the eigenvectors and eigenvalues of A*A'. If ...
1k views

### Performance optimization or tuning possible for Scalapack Gemm?

I'm comparing the performance of distributed gemm, using Scalapack over OpenBLAS, with threaded gemm, using OpenBLAS. It seems quite hard for me to get scalapack to give better results than ...
2k views

### Optimization with matrix determinant as constraint

I'm solving a constrained optimization for matrix $\mathbf{A}$ with dimension 6x6, where one of the constraints is $\mathrm{det}(\mathbf{A})>0$. I use the NLopt package to solve my problem and ...
6k views

### What is the best way to determine the number of non zeros in sparse matrix multiplication?

I was wondering whether there is a fast and efficient method to find the number of non zeros in advance for sparse matrix multiplication operation assuming both matrices are in CSC or CSR format. I ...
8k views

### Matlab solution for implicit finite difference heat equation with kinetic reactions

I am trying to model heat conduction within a wood cylinder using implicit finite difference methods. The general heat equation that I'm using for cylindrical and spherical shapes is: Where p is the ...
865 views

### Sparse hermitian eigensystems: are there better techniques than Arpack or TRLan?

As a part of other work I need to solve relatively large (~1E5x1E5) and sparse (~100 non-zero elements in each raw in few blocks) hermitian eigensystems. Usually only few eigenvalues+vectors are ...
270 views

### What is the fastest method to invert millions of matrices?

My project involves large simulation and estimation. For each simulation I need to solve 600,000 systems of nonlinear equations. Currently I am using Newton's method to find the solutions. That ...
6k views

### Efficient computation of the matrix square root inverse

A common problem in statistics is computing the square root inverse of a symmetric positive definite matrix. What would be the most efficient way of computing this? I came across some literature (...
7k views

### In FEM, why is the stiffness matrix positive definite?

In FEM classes, it's usually taken for granted that the stiffness matrix is positive definite, but I just can't understand why. Could anyone give some explanation? For instance, we can consider the ...
4k views

### Fastest algorithm to compute the condition number of a large matrix in Matlab/Octave

From the definition of condition number it seems that a matrix inversion is needed to compute it, I'm wondering if for a generic square matrix (or better if symmetric positive definite) is possible to ...
1k views

532 views

### Is there a faster method to compute the geometric series of a matrix?

I want to calculate the geometric series of a matrix $A$: $$S=I+A+A^2+\dots+A^n$$ and then apply to a vector $v$, $Sv$. I've done it in Matlab with a loop and I think it's quite efficient applying ...
2k views

### Reordering sparse matrices in computational science

On page 3 of this document, there are some matrix forms for sparse matrices. I wonder if there are other forms used in computational problems encountered in physics, chemistry, etc., so that ...
4k views

### debugging a rotation matrix for elastic constants

I have a transformation matrix which takes in the elastic constants from the local $rtl$ coordinates and then converts the elastic constants to the global $xyz$ coordinates via a rotation about the $z$...
652 views

### How to improve this double-shift QR algorithm for non-symmetric matrices?

I've implemented a version of the double-shift QR algorithm featured in this report from ETH Zurich (Begins on page 77). The algorithm takes advantage of the Implicit Q theorem by applying an ...
329 views

I've got a matrix K, with dimensions $(n, n)$ where each element is computed using the following equation: $$K_{i, j} = \exp(-\alpha t_i^2 -\gamma(t_i - t_j)^2 - \... 2answers 1k views ### Efficently invert tiny matrix in Fortran I have a piece of code in Fortran90 in which I have to solve both a non-linear (with the Newton-Raphson method, for which I have to invert the Jacobian matrix) and a linear system of equations. When I ... 2answers 1k views ### SVD of large block-hankel matrix I am trying to do SVD of a large block-hankel matrix for model order reduction (Low rank approximation). However, I quickly run into memory issues in forming the large Block-Hankel matrix and CPU ... 1answer 867 views ### Spectral decomposition with eigenvalue shift Suppose a square, real and symmetric matrix G\in\mathbb{R}^{n\times n} is given, and it is known to have one zero eigenvalue associated with all ones eigenvector, 1_n. I'm aware that the (possibly)... 1answer 53 views ### Analytic formula for \arg\max_{\|z\|_\infty \le 1}z^T A z, where A=uu^T+vv^T Let u and v be column vectors of size n \gg 1 (not both zero), and consider the matrix A:=uu^T+vv^T Question What is an analytic formula for \arg\max_{\|z\|_\infty \le 1}z^TAz=\arg\max_{\|z\... 4answers 2k views ### Finding the square root of a Laplacian matrix Suppose the following matrix A is given$$ \left[\begin{array}{ccc} 0.500 & -0.333 & -0.167\\ -0.500 & 0.667 & -0.167\\ -0.500 & -0.333 & 0.833\end{array}\right]$$with ... 1answer 129 views ### Constructing the origin position by transforming distance information Suppose a set of n points, n\in M, is given in some d-dimensional space, X\in\mathbb{R}^{n\times d}. Among these n points, some k\in K are selected, so k<n, and the distances from ... 1answer 156 views ### Factorization for reweighted least squares I am solving a problem using an iteratively-reweighted least squares method: http://en.wikipedia.org/wiki/Iteratively_reweighted_least_squares Essentially this requires solving a number of least-... 2answers 354 views ### LAPACK - singular matrices - what does the positive integer info mean? please can you help me with my code - I use Lapack to solve complex matrix (quite biq) and do it in two steps: I call zgetrf (LU factorization) and then ... 2answers 1k views ### Computational complexity and implementation of UDU Modified Cholesky Rank 1 Update I am attempting to increase the performance of a legacy Kalman Filter implementation. The state covariance is factored in terms of UDU, i.e. \mathbf{P} = \mathbf{U}\mathbf{D}\mathbf{U}^T. Many ... 2answers 199 views ### How “sparse” should a sparse matrix be to see benefits? I have a matrix, whose size scales as 2^N (assume even N). In each row of the matrix, only about 2^{N/2} of the entries are filled (N can be somewhere between 10 and 40, depending on what's ... 1answer 53 views ### Configuration shift for determination of a true dimensionality What would then be the way to determine a true dimensionality of a configuration of points X\in\mathbb{R}^{n\times k} based on its Gram matrix G=XX^T? The "true" dimensionality refers to the ... 1answer 856 views ### Is a checkerboard block decomposition of a matrix useful when solving a linear system with a parallel conjugate gradient method? According to these lecture notes, a checkerboard block decomposition should exhibit better scalability when applied to parallel matrix-vector multiplication (presumably because of greater cache hit ... 0answers 76 views ### Backward stable algorithm to get orthogonal projection onto the column space of a matrix I have to find the orthogonal projection of a vector b onto the matrix A of size m \times n. In my application, I don't have the luxury of calculating the QR factorization. All I have are ... 1answer 437 views ### How to find the nearest/a near positive definite from a given matrix? I'm given a matrix. How do I find the nearest (or a near) positive definite from it? The matrix can have complex eigenvalues, not be symmetric, etc. However, all its entries are real valued. The ... 0answers 367 views ### On solution of a class of discrete-time Lyapunov equation for systems with multiplicaitve noise Let's consider the following equation$$X=F_{1}XF_{1}^{T}+...+F_{p}XF_{p}^{T}+C$$where p is an positive integer and C is a known positive semidefinite matrix. If we augment F=[F_{1}...F_{p}] ... 3answers 407 views ### Real eigenvalues finding I have a question about matrix diagonalization. I don't know if this is the right forum... Is there a way to compute the smallest real eigenvalue (and eigenvector if possible) of a general real nxn ... 1answer 249 views ### Linear solve using CHLOMOD in C I am using the open-source CHLOMOD (as here http://faculty.cse.tamu.edu/davis/suitesparse.html) in order to solve a linear system Ax=b (performing A/b=x) in my domain decomposition code but I am ... 1answer 503 views ### ZGETRF and ZGETRS from MKL - zgetrf fails and still zgetrs works? I have a large system of equations$$Ax=b and I know matrix $A$ and right-hand side vector $b$. I'm using MKL to solve this system. The matrices are complex. I have used the general solver ...
I searched the web and found some C code for calculating the determinant of a $n\times n$ matrix. This code however seems timing complexity, and run pretty slow especially when handling a larger ...