# Questions tagged [matrix]

Questions on the manipulation of matrices in Mathematica.

2,580 questions
Filter by
Sorted by
Tagged with
57 views

### How do I solve a large system of differential equations with indexed functions?

I strongly suspect that matrix methods are the right answer here, but I am having trouble visualizing how to set it up. Imagine a large number of coupled functions: ...
81 views

### Problem when solving Kalman filter in Mathematica: How to define a spectral density matrix and calculate the covariance matrix?

I am reading the classic book on state-space control theory by Bernard Friedland. In order to strengthen my understanding of Kalman filter, I want to reproduce Example 11A (Inverted pendulum on page ...
53 views

### Prove that a sum is bounded

I have a matrix called x[n_,m_]: and I have to evaluate the next expresion: but the code has errors. How can I fix it? ...
333 views

### Simplify makes Mathematica forget that a matrix is Hermitian

Using Simplify with certain trivial assumptions makes Mathematica forget that a given matrix is Hermitian. See the minimal example below: ...
91 views

### How to overlay MatrixPlot with GridGraph?

I have a Matrixplot and a grid graph and I want to overlay them. But when I use show[g1,g2], it did come out what I wanted. I wonder how can I overlay them and make them like this? To make the points ...
49 views

### Evaluating Toeplitz determinant [closed]

How can one evaluate $-\text{log}~ \text{Det}(I_{i-j}(x))$ where $x>200$ and $I_{\nu}(x)$ is the modified Bessel function of first kind and $i,j = 1 \cdots 100$ and the determinant is take of the ...
90 views

### Create a $N\times N$ random matrix with correlated off-diagonal elements

I am working on spectral distribution of random matrices. I need to use simulations and I have been switching between MATLAB and Mathematica. I wish to perform all my computations on Mathematica. In ...
86 views

### Gauss Jordan code for mathematica

I want to find the inverse of the matrix using a unit matrix. I know it's done directly using Inverse, but I need to write a simple code. I can't write because I'm just starting to learn. How can I ...
36 views

### What kind of performance should I expect out of Eigensystem using FEAST?

I'm numerically solving a time-independent Schrödinger equation using Eigensystem's FEAST method. It takes a lot longer than I ...
94 views

### Replace the diagonal of a list of matrices

I want to replace the diagonal of a square list of matrices with another list of matrices. What is the fastest and most efficient way to do so. (I will need to do this for very large arrays) Small ...
225 views

### Finding specific eigenvalues

Given an $n\times n$ matrix $Q$ (with e.g. $n\approx10^4$) I am only interested in the 3rd smallest eigenvalue of $Q,$ and not the entire spectrum (assume all eigenvalues are real, e.g. a Hermitian ...
258 views

### Sum of all matrix entries

For large $n\times n$ symmetric matrices $T,$ where $n\approx10000,$ is there an efficient way of computing the total sum $S$ of its entries in Mathematica without having to loop over all its entries? ...
72 views

### Triangular matrices with conditions

I would like to generate a lower triangular matrix that has checkmarks in the non-zero entries. The way that I created this matrix is the following ...
221 views

### Fastest way to update rows of an array of SparseArrays

I have an array of sparse arrays (check update 3 below for a concrete example that has the same qualitative features as what I use in my real code) , say ...
523 views

### Joining matrices together

Given the following matrices (where $n$ can be any integer number, It is just for a general dimension of my space): ...
125 views

### listing matrices with some special constraint

Let we have list = {{4, 4, 4, 4}, {-4, 4, 4, 4}, {4, -4, 4, 4}, {4, 4, -4, 4}, {4,4, 4, -4}, {-4, -4, 4, 4}, {-4, -4, -4, 4}, {-4, -4, -4, -4}} I would like to first obtain the list of all ...
31 views

### Not really sure what am I doing wrong in Newton Euler iterative method

I am trying to perform iterative newton Euler method for dynamics of an RP manipulator. I have the DH table, inertia vectors and was able to get the value of wdot[i] (angular acceleration) but having ...
41 views

### Inverse[m1 m2] not equivalent to Inverse[m2] Inverse[m1], m1,m2 are 3x3 matrices, why? [closed]

I would like to use Mathematica to show that $(AB)^{-1} = B^{-1}A^{-1}$ I used ...
92 views

### Quadratic form for specific formula as matrix reprezentation [closed]

So I have problem for specific formula to create Quadratic_form form from $$y = 3 + x_1 - 2 x_4 + 2 x_3 x_4 + x_2 (-x_3 + x_4)$$ as matrix \begin{bmatrix} 1 & 0 & 0 & 0 \\ ...
35 views

68 views

### Selecting solutions that evaluate to positive

How to extract symbolic outputs of Solve that evaluate to positive at given values of parameters? For example, if ...
### Eigenvectors in the limit $\mu\rightarrow 0$ are not the same as eigenvectors when setting $\mu=0$ from the beginning
I would like to find the eigenvectors of a matrix and see what the eigenvectors look like in the limit of $\mu\rightarrow 0$: ...