Questions tagged [matrix]

For questions about using and representing matrices on a computer in order to solve computational problems. Should generally also include a tag about the specific property/problem you are solving (e.g. [tag:linear-algebra], [tag:eigenvalues], [tag:inverse].

Matrix is a rectangular array of elements (e.q. numbers, symbols, or expressions), arranged in columns and rows. They are typically used to represent linear transformations in a particular basis.

609 questions
8
votes
0 answers

Speed and accuracy of Strassen vs Winograd matrix multiplication algorithms

I am doing work which requires as fast matrix multiplication as possible and just want to double-check with this community that the Winograd variant of Strassen's MM algorithm is the fastest practical (so no Coppersmith-Winograd) algorithm. I am…
kreitz
  • 91
  • 3
6
votes
2 answers

Approximating the exponent of a matrix $\exp(A)$ using Taylor series

I am trying to approximate the exponential of a matrix. I want to use a tolerance but I am confused as to how to compute the error. Any ideas or hints?
Samu
  • 63
  • 4
5
votes
3 answers

debugging a rotation matrix for elastic constants

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 rotation about the $z$ axis (i.e., $l$ doesn't change with respect to…
Nick
  • 158
  • 1
  • 7
5
votes
2 answers

Out-of-core matrix transpose of row compressed data

Summary: Are there good algorithms for out-of-core dense matrix transpose if each row of the matrix is separately compressed? Details: The matrix is about 1 TB uncompressed, and is roughly but not exactly square. An uncompressed row is less than 6…
Geoffrey Irving
  • 3,969
  • 18
  • 41
4
votes
1 answer

Comparing Two Matrix Notation

I have two matrix A and B, I want to find pattern B in matrix A. So I get 2 pattern similar like pattern B. What the name of this operation? and How I write this in mathematics notation? Thank you in advance
el-Hakeem
  • 53
  • 3
4
votes
2 answers

Any reference which summarizes decompositions?

Is there any reference (preferably available online as PDF, Free would be best) which summarizes the various matrix decomposition with their conditions for use, usage, algorithm, complexity and underlying math? Of course, a single resource might not…
Matrix_Man
  • 41
  • 1
4
votes
0 answers

Alternative to (costly) matrix multiplication

Consider the integral $$2\pi T = -\frac{1}{2} \int_0^{2\pi} A\frac{\partial B}{\partial \xi} \ d\xi$$ where $$A= \sum_{-N}^N i \ sign(n) \ B_n e^{-in\xi}; \quad \quad B= \sum_{-N}^N \ B_n e^{-in\xi}.$$ These expansions imply $$2\pi T = \sum…
Nick P
  • 385
  • 1
  • 7
3
votes
1 answer

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 read in compressed sparse row format in order to…
3
votes
0 answers

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 product: $V = A\otimes B$, $X=VDV^{-1}$? This still…
David P
  • 33
  • 2
2
votes
0 answers

Minimize number of math operation of a specific matrix vector multiplication?

Let's say we have a Matrix M and a column vector v like below multiply equals Assume we can only perform multiplication, addition and substraction operation. With normal approach we need 3 multipliction and 3 addition to calculate row1 row1 =…
2
votes
3 answers

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 find the whole algorithm or code for the non-square…
jason
  • 29
  • 1
  • 3
2
votes
1 answer

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 from cvxopt import spmatrix import numpy as np A = spmatrix([2,-1,2,-2,1,4,3], [1,2,0,2,3,2,0],…
zhh210
  • 123
  • 2
1
vote
1 answer

Reshaping a matrix and rearranging the elements lexicographically into a vector

Let us say that I have a $3 \times 3$ matrix $\bf X$, that has to be reshaped into a vector and rearranged as follows: $$ {\bf v} ({\bf X}) = \begin{bmatrix} x_{22} & (x_{23}+x_{32}) & (x_{21}+x_{12}) & x_{33} & (x_{13}+x_{31}) & x_{11}…
Neuling
  • 23
  • 6
1
vote
2 answers

Calculate cofactor-matrix efficiently

I've implemented an algorithm that can calculate the cofactor-matrix of a matrix in $\mathcal{O}(n^5)$. The algorithm just step-by-step iterates over the whole matrix ($\mathcal{O}(n^2)$) and for every $(i,j)$ in the matrix, it then calculates the…
user34175
1
vote
1 answer

Problem about rotation matrix of elastic matrix

I have a transformation matrix $K$ which transfers elastic constitutive matrix $C$ between two coordinate systems. According to textbooks such as T.C.T. Ting's "Anisotropic Elasticity", the elastic matrix in the new coordinate system $C^*$ should be…
hillyuan
  • 11
  • 2
1
2