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

learn more… | top users | synonyms

4
votes
0answers
92 views

Least-squares for a diagonal matrix

This is a follow-up to a different question I asked with more detail. For $v\in\mathbb{R}^n$, denote $D_v\in\mathbb{R}^n$ as the diagonal matrix with elements in $v$. Given a "tall" matrix ...
2
votes
3answers
117 views

Large overdetermined system of linear equations

I'm looking for a method to solve a large overdetermined system of linear equations in a least squares sense. The matrix is dense. I'd like to use a method that works even with limited memory (we ...
4
votes
0answers
125 views

Are there improved method of computing the following expression?

given a symmetric matrix $Y \in \mathbb{R}^{n \times n}$, and an arbitrary matrix $X \in \mathbb{R}^{n \times n}$, and a vector $v \in \mathbb{R}^{n \times 1}$, is it possible to compute the following ...
0
votes
2answers
57 views

Azimuthal average in Fortran? Find indexes in Fortran?

I am working on an eigenvalue problem in fortran. I have used Lapack to solve the problem and get the eigenvalues and eigenvectors. This is done for $201\times101$ wavenumbers, only half the wavespace ...
2
votes
1answer
81 views

Constructing matrix from eigenvalues, eigenvectors (Inconsistency with Matlab's eig())

Let $F_1$, $F_2$ be the foci points of an ellipse $\mathcal{E}\colon \mathbf{x}^TA\mathbf{x}=1$, $\mathbf{x}\in\mathbb{R}^2$, $A\in\mathbb{S}_{++}^{2}$. Let also $a$, $b$ be the semi-axes of ...
2
votes
1answer
88 views

OpenCL C Matrix Multiplication over Multiple Runs

I am attempting to translate a dgemm / MPI matrix multiplier onto the GPU through OpenCL C. My issue is that the code below gives the correct output for a 9x6 matrix being multiplied by a 6x450 ...
3
votes
1answer
92 views

How does matrix-matrix product scale with multiple CPUs?

These days, one can have 64 cores in a single node. I wonder how well the dense matrix-matrix product (SGEMM and DGEMM) scales ...
0
votes
1answer
72 views

Overcoming floating point issues when Inverse does not exist but determinant provides nonzero result

I have an expression (let's say determinant of matrix A) expressed in symbolic form in terms of 2 decision variables x1, x2 and 2 parameters q1 and q2. I'm minimizing this using fmincon for different ...
0
votes
0answers
23 views

Discrete Matrix Completion Problems

I am looking for matrix completion problems where the values of the matrix are discrete, say from a categorical distribution. I have found a few reference, such as this, but this too recent. I am ...
2
votes
2answers
87 views

Computing element stiffness matrices with variable coefficients

I am trying to implement a simple FEM approach, using p1 triangular elements, for solving the diffusion equation with variable nodal diffusivities and I was wondering how to incorporate the variable ...
0
votes
1answer
56 views

GMRES: Making the matrix square without solving for boundaries

How do we define the matrix for GMRES, if we do not want to solve the boundary elements but only the interior ones. I am using pentagonal elements so in a row there are 6 elements (cell itself + 5 ...
1
vote
0answers
51 views

Implementing the transition matrix for page rank

I'm trying to implement PageRank. I'm reading the description here: http://nlp.stanford.edu/IR-book/html/htmledition/markov-chains-1.html Everything is very clear to me, however I'm concerned about ...
1
vote
1answer
124 views

Most memory-efficient way to store a list of numbers

My problem deals with a large $n \times m$ matrix from which I extract and store several square $k \times k$ submatrices. The original matrix may be very large, and I may need to store many thousands ...
1
vote
1answer
56 views

Error propagation on GSL eigenvalues computation

The problem comes from the need to estimate the error propagation of the spectral norm computation of a square matrix $A$ of which I know the components' $A_{ij}$ absolute error. The fundamental step ...
0
votes
0answers
146 views

How to solve singular non symmetric poisson equation with Neumann boundary condtions?

I am trying to solve 2D Poisson equations with Neumann boundary conditions. When the mesh is uniform, Poisson equation is singular and symmetric, so the method listed in Null Space Projection for ...
0
votes
0answers
43 views

Given a 3x3 matrix, how to convert it into desired form with elementary row transforms?

Suppose matrix $A\in \mathbb{R}^{3\times 3}$ and rank($A$)=2; if $$A= \left( \begin{array}{c} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33}\\ \end{array} ...
0
votes
1answer
149 views

computing the inverse of a large block diagonal sparse matrix in r

I would like to compute the inverse of some large block diagonal sparse matrix. The number of rows and columns is somewhat over 50,000. The blocks are 12 by 12 and are sparse (27 non zero elements). ...
1
vote
1answer
145 views

Sparse matrix - matrix multiplication

How can a sparse matrix - matrix product be calculated? I know the 'classic' / mathematical way of doing it, but it seems pretty inefficient. I thought about storing the first matrix in CSR form and ...
0
votes
1answer
99 views

Gilbert-Peierls algorithm for LU Decomposition

I searched for Gilbert-Peierls algorithm, but I haven't found anything useful (well, I found this, but it's not working as it should). I think the problem is the second part, and also that those ...
1
vote
0answers
125 views

Givens method for sparse matrix

I have a (very) large sparse matrix in CSC form and I'm supposed to factorize it. I've read that between Givens and Householder transformations, Givens is better for a sparse matrix. The problem is ...
3
votes
2answers
217 views

Finding eigenvalues of a complex symmetric tridiagonal matrix

I am trying to find specific eigenvalues and -vectors of a large complex symmetric tridiagonal matrix (at least 10000x10000, and ideally larger). I know roughly which eigenvalues I am looking for, so ...
0
votes
2answers
100 views

What to do with singular (non-invertible) rotation matrix

I have an orthotropic material with a (6x1) stress vector known in the global coordinate system and yield surfaces known in a local coordinate system. So far I have only needed to convert from local ...
3
votes
0answers
32 views

Dominant contributions of a quadratic form

Let $\Sigma$ be a covariance matrix (e.g. symmetric positive definite). For arbitrary vectors $\epsilon$, I need to compute $\chi^2 \equiv \epsilon^\top\Sigma^{-1}\epsilon$, which I do using a ...
4
votes
1answer
98 views

Updating an approximate solution to a linear system in response to a small change

This question was original posted on SO but it was suggested that I post it here. I'm working on a program in which I have a banded matrix M and a vector b, and I want to maintain an approximate ...
0
votes
0answers
28 views

Markowitz Pivoting to reduce size of a dense integer system

I am dealing with a large sparse integer matrix that I need to find the nullspace of. I've seen Markowitz Pivoting come up in several places discussing similar problems such as here: ...
1
vote
0answers
78 views

Is it possible to construct such a symmetric matrix with desired eigenvalues?

Suppose a real, dense and asymmetric square matrix $A\in\mathbb{R}^{n\times n}$, all its eigenvalues $\lambda_i \in \mathbb R$ Is it possible to construct a symmetric matrix $B\in\mathbb{R}^{n\times ...
0
votes
0answers
31 views

MLLL algorithm for sparse, integer bases to find a nullspace

I am trying to find a suitable algorithm that can find a basis for the nullspace of a sparse, integer matrix. Reading A Course in Computational Algebraic Number Theory by Cohen, an algorithm based ...
4
votes
1answer
212 views

Nullspace algorithm for a sparse matrix

I am dealing with large, sparse, rational matrices that I need to determine the nullspace of. Currently, I have one that is about 12000x12000 (but not square), where one in every 2000ish elements is ...
3
votes
1answer
88 views

What is the most efficient way to obtain the max eigenvalue of a specific symmetric matrix via Eigen C++

Suppose I have a symmetric matrix $A_{1000\times 1000}$, which can be represented by: $A = J G J^T$ where $J$ in 1000x3 is full column rank dense matrix; $G$ in 3x3 is a nonsingular dense matrix. ...
2
votes
3answers
136 views

R/C/C++ library for N-dimensional arrays

I'm looking for a library that is either in R or easily wrappable with R, that can do the following things: construct and subset N-dimensional arrays perform operations such as ...
5
votes
2answers
140 views

Inverting a pressure matrix for fluid simulation

I am implementing a fluid simulator as my numerical methods course project and I have to compute pressure at each simulation step. Basically, that means solving an equation $Ap = b$, where $A$ is a ...
2
votes
1answer
83 views

What is the more than 3rd order Taylor series approximation for a multi-variate function?

Suppose $f$ is a infinite continuously differentiable map: $R^n\to R$, and $x,x_0 \in R^n$, then we have the following second order Taylor expansion of $f(x)$ at $x_0$: $$f(x)\approx ...
0
votes
0answers
91 views

How to find out if it is possible to contruct a binary matrix with given row and column sums

How to find out if it is possible to contruct a binary matrix with given row and column sums. Input : The first row of input contains two numbers 1≤m,n≤1000, the number of rows and columns of the ...
1
vote
2answers
140 views

How to prove the 2-norm of an invertible matrix is exactly the reciprocal of its minimum singular value?

If a matrix $A_{n\times n}$ is invertible, then $\left\|A^{-1}\right\|_2 = \dfrac{1}{\min\limits_{i} \sigma_i}$ where $\sigma_i$ is the $i$-th singular value of $A$
1
vote
3answers
104 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 ...
2
votes
1answer
90 views

Is slicing matrix a view or copy in cvxopt?

It is known that Numpy basic matrix slicing will generate a view, whereas advanced slicing a copy. Is this true in cvxopt? I tried ...
10
votes
3answers
1k 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 ...
4
votes
1answer
123 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 ...
2
votes
2answers
147 views

About Subspace Iteration for Eigenvalues

I heard that subspace iteration plus Ritz acceleration could improve the performance a lot for solving clustered eigenvalues, for the eigenvalues and eigenvectors could converge linearly with ratio ...
1
vote
1answer
166 views

How to change the dimensions of an Eigen Matrix in a loop?

I have a while loop, in which I use a Matrix A, vectors B and x with varying dimensions: ...
3
votes
1answer
149 views

Linear Algebra / Numerical Solution Of Matrix With Nullspace

I have a question relating to linear algebra. We have a fluid solver that solves the poisson equation for pressures. When there are areas of the domain that are entirely enclosed by Neumann ...
3
votes
2answers
518 views

Fast algorithm for Polar Decomposition

As it known, according to the Polar Decomposition, square matrix can be expressed in the next form $$M=QR$$ ($Q$ - othogonal matrix R - positive-semidefinite Hermitian matrix) I need to find this ...
3
votes
1answer
159 views

A programming model for Quantum Mechanics angular momenta in Mathematica

I'm writing prototypes for solving the Liouville Equations with Mathematica and C++. Perhaps the question about this may not be suited for this forum in a strict way, but it suits the people here ...
4
votes
2answers
303 views

Big matrix multiplication on single machine

For example I have 2 matrices that can't fit in RAM. I need algorithm or library which can handle this.Preferably Matlab or Python. I think it can be some block matrix multiplication? Also I think ...
8
votes
1answer
246 views

Why SVD is talk about less than QR and LU for sparse matrix?

For example the C++ sparse matrix libraries I used -- Eigen and SuiteSparse, they seem not to have any SVD funcitionality for sparse matrix. So just curious, is SVD more difficult than QR/LU for ...
0
votes
0answers
21 views

how to compute Rf(:,1:mi2)/Ru as like in Matlab

How to do Rf(:,1:mi2)/Ru ? it is like division, when i use Rf*inv(Ru), as Ru is not square matrix, i can not inv it would like to do this in c# or F# in Matlab, it is doing as below ...
2
votes
2answers
137 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 ...
8
votes
4answers
152 views

Are there any quad-double arithmetic sparse matrix package?

I am working on some ill-conditioned large sparse linear system of equations. I want to use double-double arithmetic or quad-double arithmetic to solve them. I know that there is a package named MPACK ...
4
votes
4answers
459 views

Library that performs sparse matrix-vector and matrix-transpose-vector multiplication

My main interest is sparse matrix-vector and matrix-transpose-vector multiplication of the form y=y+AA'x. Is there any library that performs ...
2
votes
2answers
494 views

debugging a rotation matrix for elastic constants

So the problem is that 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 ...