# Tagged Questions

Questions on the manipulation of matrices in Mathematica.

61 views

### Find the indexes of dependent columns

I have a fairly large singular square matrix, of size 37 and rank 35. Is there a way to get a vector with the (groups of) indexes of the columns in the original matrix that are linearly dependent? ...
24 views

### Can anyone help me deduce a matrix inequality? [on hold]

The following lemma is taken from references firstly. Lemma 1 [1-2] Given matrices $Q=Q^{T} , F, M$ and $N$ of appropriate dimensions, then $$Q+MFN+N^{T}F^{T}M^{T}<0$$ for all $F$ satisfying ...
63 views

### How to extract matrix which produces given symbolic linear combinations?

Suppose I have a column matrix $\alpha$, consisting of some symbols ...
40 views

### Entering block matrices, general case doesn't work

I want to enter several matrices at different positions in blocks. There is already a very similar answer here: http://mathematica.stackexchange.com/a/3562/6138 I thought that simply generalizing ...
70 views

### What does it mean: “Assuming a matrix | Use a list of lists instead”?

I have entered a matrix by Insert->Table/Matrix->New. After adding it to code, Mathematica wrote a remark: "Assuming a matrix | Use a list of lists instead". ...
36 views

### How to define the block matrix and calculate it's inverse

How to define the following block matrix  A=\begin{bmatrix} H-G_1 & -G_1 & \ldots & -G_1 \\ -G_2 & H-G_2 & \ldots & -G_2 \\ \vdots & \ldots & \vdots & \vdots ...
44 views

### How to add a part of a list to a function?

I want to be able to add a specific portion of a list to a part of a function but this fucntion intakes 6 variables where as the list is of example: ...
40 views

### Understanding polyharmonic splines

Raul Narain and J.M. gives implementation of the thin plate polyharmonic splines in this post. Raul Narian's method is clear. J.M.'s is convenient to reuse. But J.M. used too many ...
24 views

### Calculate number of probabilities [migrated]

I want to calculate a number of probabilities of a+b+c=1 For a vary from 0 to 1 with an incrementing of 0.1 For ...
47 views

### LinearSolve in Mathematica, used to find square matrix

Another issue I have with Mathematica today is that I want to solve the following matrix equation: X.b=c where b and c are two vectors, and X is a square ...
38 views

### How to indroduce a value for the functions inside a matrix? [closed]

I would like to assign certain values to the X and Y variables which are inside the functions in the matrix. Thus, I would like to get a matrix with values based on the transformation in Psi matrix. ...
166 views

### Log of a Matrix

I have used the command MatrixLog[m] But it gives natural log of the matrix. How can I find the Log (to the base 2) of a matrix?
44 views

### Sort a vector of vectors of vectors

Let's hope I'm calling it well, I have this vector, or matrix, now I really don't know what it is ...
48 views

### Displaying a matrix as an array of solid rectangular blocks [duplicate]

I would like to plot an array of numbers as a surface, with each number the height of a square, and with the squares connected to adjacent squares with vertical rectangles, up or down as appropriate. ...
45 views

...
29 views

...
32 views

### Easy way to perform multiplication of two 2x2 matrices, that contain list elements?

I have two 2x2 matrices, which elements are lists (so overall structure can be complicated). I need to perform matrix multiplication of these 2x2 matrices as if the elements didn't have its inner ...
98 views

### matrix multiplication speed

Consider the codes below: ...
38 views

### Suggest how to do this matrix multiplication [duplicate]

Have a look at the Mathematica calculation ...
45 views

### Insert a linebreak and character repeatedly into a matrix output which is in fortranForm

Suppose I have a very long string which is a11 element of matrix a11=2*gopsv-2*Bgopsvw+2*acgmops*v+2*cgmopsv*B-2*acgmopsvB+3*gmopsvB-3*BgmopsvwB+m*w2*B +5*acgm2 +opsvB -ac*m2*w2*B +cgm2*opsvB* - ...
23 views

### How to show Output of matrix in FortranForm with “&” character?

I have a matrix. and i have shown the output of matrix one by one element in FortranForm. the problem is i want to put "&" continuation charater in output because when i am copying the data into ...
28 views

### hOW TO PUT '&' OPERATOR in output of matrix elements that are in FortranForm?

i have matrix and i have shown the output in fortranForm. but due to large characters in elements of matrix, when i copied the data into fortran Code, it does not take copied data because of line ...
65 views

### How to show output of a matrix in m(1,1)=a11 m(1,2)=a12 …in this way…i have 50 *50 size matrix

How to show output of a matrix in m(1,1)=a11 m(1,2)=a12 ...in this way......i have 50 *50 size matrix so i want to do it efficiently. output to be shown like m(1,1)=a11 (in fortranForm) m(1,2)=a12 ...
47 views

### Output of matrix in FortranForm

matr2 = Table[FortranForm[matr[[i, j]]], {i, 4}, {j, 6}] but i want output to be more like this matrix(1,1)=a11 output in ...
108 views

### Matrix multiplication

I want to multiply 1000by1000 matrices but MMA runs out of RAM. ...
48 views

### Restricting Numbers in a Matrix

I am generating a random N x N matrix, but with a certain restriction. What I'm trying to do is that when there's a "1" in a position, all neighboring positions must turn to "0" (so if [i,j] = 1, then ...
58 views

### How large can be the dimension of a complex matrix which Mathematica can handle to find its eigenalues?

I have been working with 12 cross 12 complex matrix in Mathematica , I need to work with bigger size matrix of the dimension of the order of hundreds , I was wondering if Mathematica can handle ...
93 views

### using elements from a matrix into a function

Hi this is what i have done so far i have a surface with the length "l" and width "w". and i have split this surface into m*n sub surfaces. as shown below. ...
87 views

### Integrating elements from matrix

oI'm kinda new at using Mathematica. What I'm trying to do is create a matrix with elements inside. ...
63 views

### Eigensystem on HPC

I am submitting Mathematica jobs to an HPC. I have a large matrix that is a function of (x,y) and I am diagonalizing it for around 500 points in the plane. My initial idea was to request a node with ...
453 views

### Over 30mins to generate the first eigenvector?

Is it normal for Mathematica to take over 30mins to try to compute the first eigenvector of a 100x100 matrix? The matrix is reasonably sparse - about 90% of the cells are 0s and each column sums to ...
72 views

### How to form a variable from matrix elements

I have matrix with n rows and 2 columns, say m = {{x11, y12}, {x21, y22}, ..., {xn1, yn2}. Now, I want to form three new variables for example: ...
59 views

### Submatrix with linearly independent columns

What I want is the submatrix where all the linearly dependent rows have been eliminated. I tried implementing this solution, but it doesn't work in the following example: ...
43 views

### How to display a list using numerical values? [duplicate]

Suppose I compute the eigenvectors of a matrix like this Eigenvectors [{{3, 2, 3, 1}, {2, 3, 1, 1}, {0, 0, 2, 1}, {2, 3, 2, 1}}] The result I get looks like: ...
221 views

### Quick way to tell if matrix is integer-only?

What's the most shortest one-liner code to tell whether a matrix is integer-only? I've come up with: Length@Cases[A // Flatten, _?(Not@*IntegerQ)] == 0 but ...
39 views

### Exporting mixed data of matrices and vectors / lists

thank you for reading my question. I have a problem trying to export mixed data from Mathematica. I have different matrices and vectors, which should be combined to a output file. Here a ...
129 views

### Neighbourhood - Calculations

SeedRandom[0]; n = 5; (m = N @ RandomInteger[{1, 3}, {n, n}]) // MatrixForm result1 = MeanFilter[m, 1] // MatrixForm ...
10 views

### Is there any direct method for Lagrange multiplier based domain decomposed problem? [migrated]

In elastic problem, we often solve K * u = f, where K is the stiffness matrix, f the external force vector and u the displacement vector. I'm trying decompose the mesh to domains, using Lagrange ...
3k views

### Division by zero is slow

Suppose I have two arrays of data, which I want to divide: ...
102 views

### how to diagonalize this symbolic matrix?

m = {{0, 0, w}, {0, t, -w}, {w, -w, r}} use equation P^(−1)A P, how to obtain P with Mathematica? Thanks!
90 views

### An efficient way to compare two matrices

I have two matrices mat1 and mat2, both are results from different algorithms that are supposed to calculate the same result. The nmax is around 300, the q varies from 0.001 to 1. ...
230 views

### How to extract a part of matrix satisfying certain condition(s)

I have a following matrix ...
27 views

### Automatically discover the class of an arbitrary matrix

In Wolfram|Alpha it is possible to discover some specific classes to which a matrix belongs. For instance, typing this in Wolfram|Alpha ...
100 views

### A Product function for matrix products

I would like to use an equivalent of the product-function in mathematica, but where instead of multiplying numbers I multiply matrices?
45 views

I have ...
53 views

### Programming for matrix manipulation

I want to write a programme which operates on nd x nd matrices. The programme looks the matrix as a n x n block matrix where ...
45 views

### Returning the 3-dimensional vector from a skew symmetric matrix

I'm trying to write a function that takes in a skew symmetric matrix and returns the corresponding vector. When I write the following code, it works when I leave it as variables, but it does not work ...
41 views

### Display problem multiplying matrix [duplicate]

I'm multiplying matrices and I don't get answer I want I just get matrix M times matrix N, there is no result. What to do and ...