Tagged Questions

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

5
votes
1answer
78 views

What is a good way to take fractional powers of a matrix in MATLAB?

I am working on a problem that involves taking fractional powers of particular matrices. For the matrix A with 2 on the main diagonal and -1 on the sub and super diagonal (the finite difference ...
3
votes
1answer
95 views

Why is my MATLAB code for back-substitution slower than the backslash operator?

I wrote the code below to invert an upper triangular matrix, avoiding any possible multiplication/subtraction by zero. It just uses $\frac{1}{6}n^3+\ldots$ flops instead of $n^3+\ldots$ flops. ...
1
vote
3answers
109 views

Minimize quadratic form with equality constraints

I want to minimize function: $f(x) = x^T \cdot A \cdot x + b \cdot x$ given constraints: $B \cdot x = 0$. Here: $x$ is a vector ($x \in \mathbb{R}^n$), $A$ is a matrix of size $n \times n$, $b$ ...
2
votes
0answers
69 views

Does it matter if I use principal component analysis on the transpose instead of the original matrix?

My data set is a 60x10 matrix. I performed principal component analysis of this matrix with matlab using the princomp(AdjustedData) after I adjusting my original data set by subtracting the mean of ...
0
votes
1answer
84 views

Translate a 3D point along a heading

I need to translate a point (P1) in 3D a certain amount, call it stepSize, along a vector described by a heading composed of ...
0
votes
0answers
58 views

LU Factorization update when adding columns

I am looking for a way to update the LU factorization of a general $m \times n$ matrix after adding a column to the matrix. I have to iterate this procedure so I will begin with a matrix that is $m ...
0
votes
0answers
21 views

Updating the LU Factorization [duplicate]

I am looking for a way to update the LU factorization of a general m×n matrix after adding a column to the matrix. I have to iterate this procedure so I will begin with a matrix that is m×1 and go all ...
0
votes
1answer
33 views

Writing a 3D array from Petsc

I am trying to do something fairly simple somehow I have made it hard. Is there an example of how to send a 3D array to a binary file?
5
votes
2answers
227 views

Recommendations for symmetric preconditioner

Given symmetric, positive-definite matrix $A$ and its preconditioner $M^{-1}$. What's kind of preconditioner $M^{-1}$ which preserve the symmetry of $M^{-1}A$?
4
votes
0answers
99 views

Sparse matrix ordering in Python

I would like to implement custom, domain-specific algorithms for sparse matrix orderings. I am looking for Python packages for ordering sparse matrices. It would be nice to have: The underlying ...
7
votes
1answer
140 views

Algorithm to calculate the exponential of an Hessenberg matrix

I am interested in computing the solution of a lage system of ODEs using a krylov method as in [1]. Such method involve functions related to the exponential (the so-called $\varphi$-functions). It ...
0
votes
2answers
90 views

How to decrease computation time for symmetric matrices?

We all know the problem that computation time explodes when simulating systems with big matrices. I got just this problem, but I have the advantage that I know that my matrices are symmetric. My ...
3
votes
3answers
328 views

Fast vector - “diagonal” matrix multiplication

Let $\mathbf{1}\in\mathbb{R}^d$ be a vector with all elements equal to $1$. Define: $$\mathbf{D} = \mathrm{diag}(\mathbf{1}^\top,\mathbf{1}^\top,\ldots,\mathbf{1}^\top) = \begin{bmatrix} 1 \cdots 1 ...
0
votes
0answers
35 views

Decomposing a complete weighted graph into a binary hierarchy of well-connected components

I have a complete weighted graph representing the distances between objects. I want to split it into exactly two well-connected components (then do this operation recursively to produce the binary ...
1
vote
2answers
67 views

Rearrange a dense distance matrix to a 2x2 non-perfect block diagonal form

I have a distance matrix (square, symmetrical, non-negative, dense). I want to split the objects into two well-connected groups. Mathematically speaking, I want to group (re-arrange) the rows/columns ...
2
votes
3answers
344 views

fortran code-algorithm for qr decomposition of non-square matrix

I am trying to implement QR factorization of a non-square matrix in FORTRAN. I have the algorithm for a square matrix but not for a non-square. I use Housholder matrices. Do you know where I could ...
1
vote
1answer
82 views

LSA, SVD and the Frobenius norm

In Latent Semantic Analysis one uses the SVD to perform a dimensional reduction of the term-document matrix, via the Eckart-Young theorem. Now, the rank $k$ approximation obtained by E-Y is proven to ...
3
votes
3answers
162 views

Efficient solver for a symmetric tridiagonal system where the upper/lower diagonals are offset

I'm looking for an efficient way to solve a symmetric tridiagonal system $Mx = d$, where the upper and lower diagonals of $M$ are offset from the main diagonal by $k$ rows/columns: $$ \begin{bmatrix} ...
1
vote
1answer
70 views

oSVD and cSVD terms

In one article I faced with such terms as sSVD, cSVD and oSVD. As I understand sSVD - standart SVD, cSVD - svd for block-circulant matrices, but I can't find what is oSVD. 1) What is oSVD? 2) Can ...
2
votes
3answers
198 views

Dense distributed matrix

A dense matrix is distributed for parallel computation column-wise, then multiplied from left & right by sparse matrices. What would be appropriate c++ libraries for these tasks?
3
votes
2answers
186 views

Methods for solving linear systems

This is such a basic topic but there are so many different methods proposed for solving a linear system of equations. I recently found a very good source but couldn't really make sense of all the ...
2
votes
1answer
108 views

SVD and HITS Algorithm Power Iterations

As we know, computing the authority (or hub) score of HITS ranking method, means to use the following matrix equation: $$ \textbf{a}^{k}=A^T A\textbf{a}^{(k-1)} $$ and apply the power iteration ...
5
votes
0answers
84 views

Wanted: sequences of linear systems for recycling Krylov solver analysis

In the solution of sequences of linear systems $$A_ix_i=b_i\quad\text{for}\quad i=1,2,\dots$$ with Krylov subspace methods, data can be recycled from already solved linear systems in order to speed up ...
0
votes
2answers
112 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 ...
1
vote
1answer
42 views

detecting special $2 \times 2$ matrices in a large array of zeros and ones

I have a large array of zeros and ones and I need to count instances of 0 1 1 0 0 0 1 1 0 1, 1 0, 1 1, 0 0 And I would like to exclude all ...
4
votes
0answers
74 views

Tracking for two meshes

I'm dealing with physical simulation (position based dynamic). Now I'm trying to realize tracking for two meshes. In order to explain what does it mean, let's assume that we have two similar meshes: ...
0
votes
0answers
21 views

Minimum sparsity of two randomly populated matrices leading to performance increase when switchting from dense to sparse matrix multiplication

Given two 2D matrices A, B which are going to be multiplied by a matrix multiplication algorithm. Properties of matrix A The columns are grouped into blocks of size N. Within each block identified ...
3
votes
2answers
170 views

Solving Newton-Raphson step with ill-conditioned sparse matrix

I am trying to build a complex simulator for the transport of mass & heat in porous media. I am currently following coarsely the algorithm laid out in an older software and have got the simulator ...
1
vote
1answer
103 views

Problem with convergence of Jacobi iterative algorithm

I'm dealing with Jacobi iterative method for solving sparse system of linear equations. For small matrices it works well and gives right answers even if matrix is not strictly diagonal dominant, ...
1
vote
0answers
55 views

Efficient way to do congruent transformation using matrix inverse?

I know a square self-adjoint matrix $S_{vv}$ and I want to find: $S_{rr} = HS_{vv}H^{\dagger}$ where $\dagger$ denotes conjugate transpose. I do not know $H$ but I do know $H^{-1}$. What is the ...
2
votes
4answers
374 views

cartesian products in numPy

Have two arrays, in my case $X = \{1,2,\dots, n\}$ or X = np.arange(n). How do I get $Y = X \times X = \{ [i,j]: 1 \leq i,j \leq n \}$ as a 2D array in numPy? ...
3
votes
0answers
53 views

Matrix completion when the eigenvectors are a tensor product?

Suppose we have incomplete observations of the square matrix $X$. Most matrix completion algorithms assume the matrix is low-rank. What if instead we assume the matrix of eigenvectors is a tensor ...
0
votes
1answer
89 views

inverse of a quadratic form

I have an expression of the form: $ACA^{'}$ where $C$ is an invertible, symmetric and positive definite matrix. I'm trying to figure out if the expression above is invertible. The $C$ matrix is ...
1
vote
0answers
123 views

closed form approximation of matrix inverse with special properties

I'm trying to find some theory to help me explicitly express the inverse of a matrix (or a close approximation of the inverse). My matrix has the following properties: invertible positive definite ...
3
votes
1answer
192 views

How to use eigenvalue information to efficiently diagonalize matrices?

I apologize if this question in a more general form has been asked before. I have a tridiagonal Toeplitz matrix $K$, whose eigenvalues and eigenvectors are known analytically for any dimension $N$ ...
2
votes
1answer
101 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 ...
0
votes
0answers
95 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 ...
2
votes
2answers
159 views

Cropping in Sparse Matrix

Let $A$ be an $M \times N$ sparse matrix stored in compressed column format, in a C-like programming environment. I am interested in the best solution to get a sub-matrix of $A$. In MATLAB notation, ...
2
votes
1answer
87 views

Sparse matrices origins

I am using the sparse matrices provided by the University of Florida Sparse Matrix Collection and most matrices are accompanied with little description of the problem or discipline from which the ...
1
vote
1answer
126 views

Is there congruent transform implementation for dense symmetric matrix in Eigen(C++)?

I need to determine whether a real dense symmetric matrix is positive definite or not. One possible way is to obtain all the eigen values and check the sign of the minimum eigen value but requires ...
5
votes
1answer
349 views

Solving system of linear equations with cyclic tridiagonal matrix

I have this problem in my textbook: Suggest efficient algorithm for solving system of linear equations with cyclic three-diagonal matrix, that is of the form: \begin{bmatrix} ...
3
votes
1answer
224 views

Sparse matrices that represent common stencil operations

I am not sure if this is the correct place to ask this question! Is there a data set such as the University of Florida Sparse Matrix Collection which is produced from stencil operations? Or is ...
3
votes
2answers
357 views

Matlab preconditioned conjugate gradient on big matrix

I have a sparse $5\,656\,236 * 5\,656\,236$ matrix $A$ with $166\,526\,888$ non-zero elements. The matrix comes from using the finite element method on a linear elasticity problem and is positive ...
3
votes
1answer
133 views

Inverting many small matrices in parallel

I am trying to find a good way to handle the following problem: Let C be an N by 3 array (corresponding to points in $\mathbb{R}^3$). There is a method I am interested in testing which requires ...
3
votes
2answers
567 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
66 views

Modification of Levinson algorithm for hermitian toeplitz matrix

I have implemented Levinson algorithm for toeplitz matrix by book: Blahut "Fast algorithms for digital signal processing". Book said - modification of this algorithm for Hermitian matrices is simple ...
0
votes
0answers
65 views

Increase convergence of non-linear equations resulting from ODEs

I am trying to solve a set of couple ODEs: $V_l(r) - r W_l(r) - f1(r) W_l' = 0\tag 1$ $r^2 h''_l(r) + f2 r h_l'(r) + f3 h_l(r) - f4 U_l(r) = 0 \tag 2$ $\kappa (U_l + h_l) + V_{l+1} + W_{l+1} = ...
3
votes
1answer
163 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 ...
6
votes
2answers
233 views

How important is the exponential of a matrix in computational science?

CS people: The title is the question, as I will explain. As everyone reading this probably knows, if $A$ is a square matrix of real or complex numbers, then $e^A$, or $\exp(A)$, is the matrix of the ...