We’re rewarding the question askers & reputations are being recalculated! Read more.

# Questions tagged [matrix]

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

496 questions
Filter by
Sorted by
Tagged with
400 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 ...
346 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 ...
246 views

### How to find closed form $C$ such that $CC^T = AA^T + BB^T$

How to find $C$ such that $CC^T = AA^T + BB^T$, $A$ and $B$ are known. $A = \left(\begin{matrix}X\\Y\end{matrix}\right)$, $B = \left(\begin{matrix}0\\cY\end{matrix}\right)$, $c$ is a constant. To ...
97 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 ...
307 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 ...
182 views

### Generation of random Matrix with Real eigen values

does anyone know any matlab algorithm that can help me generate a random matrix with REAL EIGEN values? Thanks.
149 views

1k views

### What is wrong with this matrix multiplication?

I am attempting to write a matrix multiplication routine because I need to do some analysis in CUDA and I want to validate it with CPU code. I am trying to use <...
262 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 ...
518 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, ...
113 views

### Is this the correct procedure for calculating matrix spectrum?

I am not sure if my question is on topic but I have a piece of Fortran code that is used to perform successive over relaxation. Prior to performing successive over relaxation the author is calculating ...
2k views

### BLAS, LAPACK or ATLAS for Matrix Multiplication in C

I am trying to find the most optimized way to perform Matrix Multiplication of very large sizes in C language and under Windows 7 or Ubuntu 14.04. And searching led me to BLAS, LAPACK and ATLAS. ...
294 views

### Sparse matrix vector product using PETSC

I am trying to do a simple parallel sparse matrix vector multiplications using PETSC. My sparse matrix is a simple tridiagonal laplacian matrix, which is distributed over multiple processors using ...
706 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 ...
262 views

### How can I efficiently solve $Ax$=$b$ given $A$ is symmetric and contains very small (even negative) eigenvalues using EIGEN

Currently I am using the EIGEN C++ library to try to solve $x$ from the equation $Ax$ = $b$. One problem I encountered is that the matrix $A$ is a correlation matrix with size > 5000 and can ...
102 views

### How do I make sparse solvers to accept custom matvec function insted of matrix?

I have tried it with Lis, Intel mkl and PETSc. Everywhere you need to pass an actual matrix ...
123 views

### What is the computational cost of using complex numbers in contrast to real numbers in matrix operations, e.g. $LU$ or $LDL^T$ factorizations? [duplicate]

I am curious about how much one loses in terms of computational cost, when complex numbers are used instead of real numbers? I guess the number of floating point operations and memory doubles, but I ...
1k views

### How can I prove that two eigenvectors are orthogonal?

I obtained 6 eigenpairs of a matrix using eigs of Matlab. How can I demonstrate that these eigenvectors are orthogonal to each other? I am almost sure that I ...
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 ...
188 views

### Solving large system of equations, is linear programming best option? [closed]

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 equation,...
3k views

### How to use the basic Sparse matrix operations (multiplication, .etc) in PyCUDA

I try to use sparse matrix operations in GPU in Python and now try to use PyCUDA with theano. But I can't find how to do sparse matrix and vector multiplication. I only got an example showing how to ...
482 views

### Numerically stable approach for calculating x in Ax=b

I have an equation $Ax=b$ for which I need to solve for numerous $x$ matrices given $b$. Both $x$ and $b$ are nx1 matrices. Unfortunately, $A$ is a 32x32 matrix and inversion gives highly unstable ...
134 views

### Is my matrix symmetric?

I obtained a mass matrix through Finite Elements discretization. Now, I want to check if it is symmetric. To do that I subtract to my matrix $M$ its transposed $M^T$. The result is another matrix of ...
27k views

### What is the fastest algorithm for computing the inverse matrix and its determinant for positive definite symmetric matrices?

Given a positive definite symmetric matrix, what is the fastest algorithm for computing the inverse matrix and its determinant? For problems I am interested in, the matrix dimension is 30 or less. ...
799 views

### Parallelization of element-wise matrix multiplication

I use Armadillo as an interface to OpenBLAS. In my current program, I have a loop, in which I do multiplications of the form ...
111 views

### How does an unpivoted QR fail to reveal rank?

An unpivoted QR factorization produces a triangular factor $R$. A rank-revealing QR factorization is typically done with column pivoting. My question is, how does an unpivoted QR factorization fail to ...
10k views

### Super C++ optimization of matrix multiplication with Armadillo

I'm using Armadillo to do very intensive matrix multiplications with side lengths $2^n$, where $n$ can be up to 20 or even more. I'm using Armadillo with OpenBLAS for matrix multiplication, which ...
I try to solve the problem $Ax=B$ where $A$ is a large sparse $n\times n$ matrix, and $B$ is a dense $n\times m$ matrix (here $n=754850$ and $m=182$). The backslash operator yields correct solution (<...