In linear algebra, an $m$x$n$ matrix maps vectors from space $R^m$ to $R^n$. Matrices are distinguished from multidimensional arrays, which is a general term for any rectangular array of information.

learn more… | top users | synonyms

2
votes
0answers
100 views

Compute sparsity pattern of matrix product (special cases) [duplicate]

Suppose we have a sparse matrix $A$. If I need the sparsity pattern of $A^2$, is it best to just compute the sparse product $A*A$? I do not actually need to know what exactly the nonzero value are. ...
1
vote
0answers
39 views

Fixing a near singular covariance matrix

Given a near singular covariance matrix, the standard method of 'fixing' it seems to be to add a small damping coefficient $c>0$ to the diagonal, which serves to bump all the eigenvalues up by this ...
0
votes
0answers
48 views

Most efficient and practical way to avoid calculating inverse matrix?

So I've heard about the LU decomposition applied to avoiding calculating the inverse of a matrix and how it's so much more efficient than the typical inverse calculating functions in numerical ...
1
vote
1answer
33 views

Use double index in matrix multiplication

I want to run a simulation which involves rates between different states. Each state is label by a pair of indices $(m,n)$, so that a certain rate $R_{(m,n)\rightarrow(m',n')}$ requires four indices ...
4
votes
0answers
41 views

Mobile robot path following using model predictive control (MPC)

I'am trying to implement a path following algorithm based on MPC (Model Predictive Control), found in this paper : Path Following Mobile Robot in the Presence of Velocity Constraints Principle: ...
1
vote
1answer
34 views

Sparse Matrix Matrix multiplication terminology (SpGEMM or SpMM?)

I have seen sparse matrix-matrix multiplication commonly referred to as SpGEMM, which means general/generalised sparse matrix-matrix multiplication. I've seen it once or twice (forgot where) as SpMM. ...
0
votes
0answers
68 views

Computational complexity for generating this matrix?

There is a $m\times n$ non-symmetric Toeplitz matrix $T$ generated using a deterministic function $f$ and the relationship is $x(n) = f(x(n-1))$. For example, $f(x) = 4x(1-x)$ A single sequence $x$ ...
1
vote
1answer
58 views

Creating a matrix that saves storage

Suppose $A\in\mathbb{R}^{n\times n}$ is a banded matrix, i.e., a matrix with all of its nonzero elements on the main diagonal, i.e., $\alpha_{i,i}\neq 0$, the first superdiagonal, i.e., ...
0
votes
1answer
49 views

Condition Number of Rectangular Matrices

The 2-norm condition number can be easily extended to rectangular matrices. I'm wondering if the inequality for the product of matrices still holds in that case, i.e., $\operatorname{cond}(AB) \leq ...
4
votes
1answer
57 views

Algorithm to decompose a sparse unitary matrix into a Kronecker product of smaller unitary matricies

Given some sparse unitary square matrix $A$ ($dim=2^n$ if it matters), is there an algorithm to decompose $A$ into a Kronecker/tensor product of smaller unitary matrices? In other words: decompose ...
1
vote
2answers
205 views

Methods for fast approximation of convolution

What are the state of the art methods for fast 2D convolution approximation? I'm familiar with SVD based multiplication and cross approximation approaches, but would be thankful to get additional ...
4
votes
1answer
102 views

Efficient way to generate a list of possible matrices (all integer components) with a determinant $V$

I have an interesting problem from my research that I have been struggling to solve. One part of the problem involves generating all possible matrices, where each set contains three integer vectors, ...
4
votes
1answer
57 views

How to read a Harwell-Boeing Matrix file format into a compressed sparse row format in a C program?

I have to write a program where I have to perform matrix-vector multiplication and the matrix is sparse matrix. Most sparse matrices available online are in Harwell-Boeing format and they have to be ...
3
votes
1answer
99 views

strassen algorithm vs. standard multiplication for matrices

I am trying to figure out at exactly what dimension it is better to use Strassen algorithm rather than the standard multiplication. I know that there is 18 addition and subtraction in Strassen ...
0
votes
0answers
51 views

Using DSYEV in LAPACK

I am calculating eigenvalues of a symmetric matrix using DSYEV in LAPACK.The concerned matrix is in a lower triangular form in a .dat file. I was searching for a simple explanation of the parameters ...
3
votes
1answer
79 views

Resources for solving mixed left and right matrix equations

I'm looking to solve a matrix equation and not sure where to start looking for resources. The equation is $$AX + XB = C\,,$$ where $A\in\mathbb{R}^{n\times n}$, $B\in\mathbb{R}^{m\times m}$, ...
0
votes
0answers
34 views

Constrained SVD/Lanczos given left/right matrices are banded

$A$ is a symmetric (known to be invertible) matrix of size $(N+p) \times (N+p)$ and $X$ is a rectangular matrix of size $(N+p) \times N$. The product $X^{T}AX$ is well-defined and non-singular. One ...
0
votes
1answer
75 views

Extending the Frobenius inner product to all matrix inner products

So in ${\bf R}^{n\times p}$ we have the Frobenius inner product given by $$\langle A, B\rangle=\text{tr}(A^TB)$$ which can be interpreted as the Euclidean inner product on ${\bf R}^{np}$. My ...
0
votes
0answers
40 views

Extracting sinograms from tomography projections

my name is Lorenzo and I am a postdoc researcher in Italy. My job is related to tomography imaging using synchrotron radiation. This is a new field for me and I start to face with Matlab to write some ...
4
votes
1answer
90 views

Finding the matrix inverse given a solver for the matrix equation $Ax=b$

So I'm given a solver that can solve for $x$ in the matrix equation $\underset{=}{A} \underline{x} = \underline{b}$ where $b$ can be anything we specify. (NB: A is an NxN matrix). I now want to find ...
1
vote
2answers
70 views

Inverse of “diagonally not dominant matrix”

I want to frame a higher order Central difference scheme of about $20^{th}$ order for first derivative. I'm using $20^{th}$ order because I need one scheme with good modified wave number. To find the ...
2
votes
1answer
99 views

Armadillo library appears slow

I have been experimenting in building a C++ project for a FDTDS system for Electro-Magnetics. I have implemented a class [see below] which I called mesh using the Armadillo library. The 3D matrices ...
0
votes
0answers
20 views

What is the benefit of time varying system methods when the dynamic degree is lower than the dim of the larger transfer operator?

What is the benifit of time varying system methods when the dynamic degree(the maximum hankel rank) of involved systems is significantly lower than the dimension of the larger transfer operator? ...
1
vote
1answer
54 views

How to compute the Jacobi matrix (tridiagonal matrix) of a polynomial with a recurrence relationship?

I am looking at Trefethen and Bau Exercise 37.1: I have two normalizations of the Legendre polynomials with corresponding recurrence relations: $$P_n(1)=1$$ which follows $$P_n(x) = \frac{2n-1}{n} x ...
8
votes
0answers
112 views

Fast computation of component-wise $\exp(-XY^T)G$ for random $G$

I have the following question: Suppose I have two matrices $X,Y$ both of size $m\times p$ and a random i.i.d Gaussian matrix $G$ of size $m \times k$, $m\gg p>k$. Is there a fast way to compute ...
3
votes
2answers
122 views

Optimized parallel routine for $X' W X$ with $W$ diagonal

$X$ is a dense matrix of real doubles, typically of size 20 million rows and 500 columns, and $W$ is a diagonal matrix of real, non-negative doubles stored as a vector. I'm working in C and have ...
2
votes
0answers
91 views

FLOPS of a linear system

I have two questions that I want to ask. Consider the following system: $$BM = A$$ i) $B$ is a $n$ by $n$ tridiagonal matrix and $A$ is a diagonal matrix. What is the leading order computation cost ...
3
votes
1answer
79 views

Fast algorithm for computing matrix square root using randomized linear algebra?

Is there a fast algorithm for computing the matrix square root of a real symmetric matrix using random matrices or randomized algorithms?
4
votes
1answer
97 views

Obtaining column vectors of pseudo-inverse of a matrix

I need to compute the pseudo-inverse of a very large rectangular dense matrix without any special structure or properties. I run out of memory/computing power and have no access to a large parallel ...
2
votes
1answer
104 views

Kernel of a Sparse Matrix

Given a sparse rectangular matrix $A$ (let's say, with dimension $n,m$ and number of non-zero elements $O(n)\sim O(m)$) with entries in $\mathbb Z/2\mathbb Z$ I'm looking for a basis of the kernel as ...
3
votes
1answer
61 views

Does $\log(\det(A))$ equals sum of log of diagonal elements of D in LDLT decomposition?

For a large matrix $A$, I need to evaluate the $\log(\det(A))$. I already have it's LDLT decomposition. Is it possible to evaluate the $\log\det$ with the elements of the diagonal $D$ of the LDLT ...
1
vote
2answers
156 views

QR decomposition

I have a matrix which is "almost" like an upper triangular just that the last row has non zero elements. And I want to perform the QR decomposition on that matrix. Does anyone know the "name" of such ...
4
votes
2answers
320 views

Calculating the log-determinant of a large sparse matrix

I need to calculate $\log(\det (\mathbf M_i))$ where the $\mathbf M_i$'s are large sparse matrices, which are real, symmetric and positive semi-definite. I hope to have between $10$ and $100$ of ...
1
vote
1answer
123 views

On the fly/matrix free SVD of large sparse matrix

I am trying to apply SVD to large sparse matrices. I already compared the performances of Propack and irlba to those of the matlab svd and ...
2
votes
0answers
75 views

Hessian eigenvalues in 4D-VAR data assimilation

I am using variational data assimilation (4D-VAR) to estimate emissions of anthropogenic greenhouse gases using a rather complex atmospheric transport model. Hence, the optimal solution to my problem ...
3
votes
1answer
68 views

Sparse Matrix Reordering

Matrix reorderings are important for many direct solvers. Sometimes the objective is to reduce the bandwith or the generated fill in by LU Decomposition. I am interested in a reordering which reduces ...
1
vote
1answer
307 views

Efficiently extracting a submatrix in Matlab

Suppose I have this matrix in Matlab R2013a M = kron(A,B); where A and B are $N \times N$ ...
4
votes
0answers
64 views

What is the source of the error in the Sherman-Morrison formula application?

The Sherman-Morrison formula $$ (A+uv^T)^{-1} = A^{-1} - \frac{A^{-1}uv^TA^{-1}}{1+v^TA^{-1}u} $$ results in small errors in relation to the standard matrix inverse operation after each application, ...
1
vote
0answers
38 views

fixed point iteration to find out second order non-linear diff equations

I am working on some model analysis, getting two diff equations and after I convert them into matrix form, I have equations looks like $$ [A][X]=C\times\big(\exp([B][X])-1\big), $$ where $C$ is a ...
0
votes
1answer
121 views

How to represent a binary number in a matrix in Matlab?

This is a fairly simple question but my Matlab knowledge is still very limited. I want to take a given binary number (or rather, a bistring) of length $mn$ and generate an $m \times n$ matrix whose ...
4
votes
1answer
56 views

Is there an efficient $O(n^2)$ way to get the eigen decomposition given a LDL factorization?

Let's say I have a LDL factorization of a matrix A. Is there an efficient $O(n^2)$ way to get the eigen decomposition of A given it's LDL factorization? Is there a more efficient way, in case L and ...
3
votes
1answer
60 views

Is there an efficient $O(n^2)$ way to estimate in MATLAB a matrix condition number given its LDL decomposition?

Since evaluating a matrix condition number usually takes $O(n^3)$, I wonder whether there is an efficient $O(n^2)$ way to estimate in MATLAB a matrix condition number given its LDL decomposition. ...
2
votes
1answer
129 views

Recommendation for C/C++ library which offers Schur complement functions?

I need to find C/C++ libraries which offer function for computing Schur complement. I know about MUMPS and Pastix, but I need more of them to compare them in my research. Do you have any experience ...
0
votes
1answer
52 views

Evaluating a quadratic form with an inverse of a sparse PD matrix, comparison between using the inverse vs using a Cholseky decomposition

I have the following quadratic form I need to evaluate: $x^T A^{-1} y$, where $A$ is a sparse positive definite matrix, $x, y$ are sparse vectors. Now assume that I am given for free both $A^{-1}$ ...
2
votes
2answers
367 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 ...
1
vote
1answer
167 views

$AX=B$: How to solve for $X$ if elements of matrix A are matrices

Objective: I am trying to solve for $C$ in 2D space (x,y) and time from following PDE. $$ \text{PDE: }\frac{\partial C}{\partial t} + \nabla\left(v.C - D\nabla{C} \right)= \alpha.C $$ Method: I ...
1
vote
1answer
92 views

Fast algorithms for computing only the generalized singular values (but not the vectors)

I am interested in computing only the generalized singular values, and was wondering if this was faster (and by how much?) than computing the full GSVD. In particular, I was wondering what the ...
3
votes
3answers
210 views

Exact analytical matrix inversion of sparse 100x100 matrices in C++

I need to invert a matrix. Of course, I'm not the first person in this situation, and I know that there's a wealth of powerful libraries out there, of which I only know a couple. That being said, ...
1
vote
1answer
125 views

Convert Image of Map to 2D Grid in Python

I have this map showing the geography of Europe (below), and I wish to convert it to a matrix in python that would be a 2D approximation of this image where 0's would represent the ocean and 1's would ...
-1
votes
1answer
75 views

Solving large system of equations, is linear programming best option?

I have a problem where I am trying to solve many systems of equations, that have very few variables per equation, but a lot of equations. For example potentially 10 variables max in a single ...