Questions tagged [matrix-decomposition]

In the mathematical discipline of linear algebra, a matrix decomposition or matrix factorization is a factorization of a matrix into a product of matrices.

In the mathematical discipline of linear algebra, a matrix decomposition or matrix factorization is a factorization of a matrix into a product of matrices.

In numerical analysis, different decompositions are used to implement efficient matrix algorithms.

94 questions
3
votes
3 answers

My example shows SVD is less numerically stable than QR decomposition

I asked this question in Math Stackexchange, but it seems it didn't get enough attention there so I am asking it here.…
daydayup
  • 2,049
  • 5
  • 22
  • 47
3
votes
1 answer

MATLAB LU Decomposition Partial pivoting

I'm trying to work with my lu decomposition largely based on LU decomposition with partial pivoting Matlab function [L,U,P] = lup(A) n = length(A); L = eye(n); U = zeros(n); P = eye(n); for k=1:n-1 % find the entry in the left column with the…
Blob911
  • 139
  • 2
  • 10
3
votes
1 answer

Time complexity of Cholesky Decomposition for the LDL form

There are two different forms for Cholesky Decomposition: A = M * ctranspose (M) and the LDL form A = L * D * ctranspose (L) where ctranspose is the complex transpose. I want to know the number of floating point operations for each form. …
Z boson
  • 32,619
  • 11
  • 123
  • 226
3
votes
0 answers

4x4 transform matrix decomposition

I'm trying to decompose a homogeneous coordinates transform matrix which is the result of these transformations matrices (applied in their writing order): non-uniform Scale -> Rotate -> Translate I haven't any problem in extracting the translation…
mrcointreau
  • 342
  • 5
  • 16
2
votes
0 answers

How to compute the operator Schmidt decomposition of a matrix using python

How to do THIS in python? Currently, I can transform a 4X4 matrix 'A' into its bipartite shape [2,2,2,2], as described in here. Once performing the SVD on the latter (the transformed version of 'A') using python via: NumPy SVD: U, S, Vh =…
2
votes
1 answer

Eigendecomposition and "composition" in Julia

I've been going through some tutorial on factorization in Julia. For the sake of practice, I am trying to take eigendecompositions from a matrix and recreate the original Matrix, using the formula: A = VλV⁻¹ Where V is a matrix of eigenvectors, λ is…
2
votes
1 answer

Dulmage-Mendelsohn matrix decomposition in Python

Matlab has a function called dmperm that computes the so-called Dulmage–Mendelsohn decomposition of a n x n matrix. From wikipedia, the Dulmage–Mendelsohn is a partition of the vertices of a bipartite graph into subsets, with the property that two…
linello
  • 8,451
  • 18
  • 63
  • 109
2
votes
1 answer

Are eigenvectors returned by R function eigen() wrong?

#eigen values and vectors a <- matrix(c(2, -1, -1, 2), 2) eigen(a) I am trying to find eigenvalues and eigenvectors in R. Function eigen works for eigenvalues but there are errors in eigenvectors values. Is there any way to fix that?
Karan Bari
  • 75
  • 3
  • 10
2
votes
1 answer

Inconsistent results between LU decomposition in R and Python

I have the following matrix A in R: # [,1] [,2] [,3] [,4] # [1,] -1.1527778 0.4444444 0.375 0.3333333 # [2,] 0.5555556 -1.4888889 0.600 0.3333333 # [3,] 0.6250000 0.4000000 -1.825 0.8000000 # [4,] 0.6666667 …
989
  • 12,579
  • 5
  • 31
  • 53
2
votes
1 answer

Using fewer loops for LU decomposition

There are several ways in Matlab to calculate "LU decomposition". Here is one: function [L,A]=LU_factor(A,n) L=eye(n); for k=1:n if (A(k,k) == 0) Error('Pivoting is needed!'); end L(k+1:n,k)=A(k+1:n,k)/A(k,k); for j=k+1:n …
2
votes
0 answers

How to reuse decomposed LU matrix to solve Ax = b in JBLAS

I have started working with JBLAS, but I am facing an issue, doubleMatrix x = Solve.solve(A,b); This gives the results just fine. But if i wish to do a recalculation to find Ax = b1, then it will go all over again to decompose to get A = LU or…
harpribot
  • 223
  • 1
  • 11
2
votes
2 answers

R: Error with irlba

I'm trying to decompose a square matrix with the R package irlba but am getting the following message: "Error in V[, 1:(k + dim(F)[2])] <- cbind(V[, 1:(dim(Bsvd$v)[1]), drop = FALSE] %*% : number of items to replace is not a multiple of…
Marc in the box
  • 11,769
  • 4
  • 47
  • 97
2
votes
2 answers

Libraries for parallel distributed cholesky decomposition in c/c++ in mpi environment?

What libraries are available for parallel distributed cholesky decomposition of dense matrices in C/C++ in mpi environment? I've found the ScaLAPACK library, and this might be the solution I'm looking for. It seems that it's a bit fiddly to call…
Hugh Perkins
  • 7,975
  • 7
  • 63
  • 71
1
vote
0 answers

PETSc - MatLUFactor - Problem for `mpiaij` matrix and replace by SuperLU

I am a beginner in using PETSc and I am trying to develop a function to reverse a PETSc matrix. However, as I am using a mpiaij matrix, PETSc shows no support for this type. [0]PETSC ERROR: No support for this operation for this object type [0]PETSC…
lcs_27
  • 11
  • 3
1
vote
1 answer

Is there a way to find which direct solver is using solve()?

As the title says, is there a way to find out which matrix decomposition is applying the function solve() for a given sparse matrix in R? For example, in Matlab there is spparms('spumoni', 2); , which return some info about the algorithm used to…