Questions tagged [linear-algebra]

Questions about Mathematica functionality related to manipulating vector spaces and linear mappings between such spaces. This includes determination of matrix properties, matrix transformations, decompositions, and factoring.

Filter by
Sorted by
Tagged with
1 vote
0 answers
27 views

Mathematica's definition of cos(kA) where A is the 1st Pauli spin matrix

For a homework assignment I was asked to derive the formula of $e^{ik\sigma_{1}}$ - where $\sigma_{1}$ is the Pauli spin matrix {{0,1},{1,0}} - using the Taylor ...
Raketenmensch 's user avatar
1 vote
0 answers
65 views

Solving a linear algebra problem containing minimal polynomial degree

Consider a set of three-dimensional points ${\left\{{\left(a,ab,abc\right)}~\middle\vert~a,b,c\in\mathbb{N_+}\land a+b+c\leqslant2023\right\}}$. If there exists a non-zero real polynomial $\...
user688486's user avatar
0 votes
0 answers
58 views

How to create an n-by-1 matrix from user-input values? [closed]

I want to create a n-by-1 matrix for any n inputed by the user. Also the elements in the matrix should be entered by the user.
amina thasneem's user avatar
1 vote
2 answers
83 views

Can you recover the original vectors that, when summed together, achieved a particular criteria

I am wondering if it is possible to take the binary strings of length $3$ (tuples) whose sums have weight $2$ (i.e they have $2$ non-zero entries)(binary case, meaning they have two $1$'s entries) $$u ...
Aislin_367's user avatar
1 vote
1 answer
23 views

How to find and delete the duplicates from lists of vectors

What I want to do is to take a list of vectors: u={{1,0,0,0},{0,1,0,0},{0,0,1,0}} v={{1,1,1,1},{1,0,0,0},{0,1,0,0}} I want to find the duplicates between u and v ...
Aislin_367's user avatar
1 vote
0 answers
65 views

Mapping two pure functions over different lists

Say if I have two lists of vectors of the same length, for example: u = {{1,0,0},{0,1,0},{0,0,1}} v = {{1,0,1},{1,1,0},{1,1,1}} I want to add (modulo 2) ...
Aislin_367's user avatar
1 vote
2 answers
42 views

How to delete duplicate lists of vectors (in any order) from a list of lists?

I have a list of vectors: v={{{0,0,0},{0,0,1},{1,1,0}}, {{1,0,0},{1,1,1},{0,1,1}}, {{0,0,1},{0,0,0},{1,1,0}}} Clearly, the first entry and the third entry contain the same vectors. I want to delete ...
Aislin_367's user avatar
4 votes
1 answer
58 views

Commutant of set of matrices

I'm trying to compute the commutant of a set of matrices, so the set of matrices that commutes with all matrices in the original set. I'm a complete newbie with mathematica, so I would be greatful for ...
giztt's user avatar
  • 43
0 votes
1 answer
63 views

Gauss elimination with pivoting error

I am attempting to write code for Gaussian elimination with pivoting. I need my code to be able to find the maximum pivot in the column and swap the rows to ensure that the first element is always the ...
Larissa Santos's user avatar
0 votes
1 answer
218 views

Nullspace if denominator is zero

This question is based on a previous question where the matrix mat = {{0, s, 1, 0}, {-s, 0, 0, 1}, {1, 0, 0, -s}, {0, 1, s, 0}}; is given and one wants to determine ...
granular bastard's user avatar
0 votes
1 answer
35 views

Transition to a new basis with rotation of one of the axes [closed]

The lengths of the basis vectors e1 and e2 of the general Cartesian coordinate system on the plane are equal to 4 and 2, respectively, and the angle between the basis vectors is 120°. Relative to this ...
Сергей Малышев's user avatar
0 votes
1 answer
40 views

How to define linear mappings on a vector space spanned by abstract symbols?

Say I have an infinite dimensional vector space $V$ with basis consists of abstract symbols $\{ a_j \}^\infty_{j=0}$, and consider a linear function $f$ on $V$ defined by its action on the basis ...
Lagrenge's user avatar
  • 119
1 vote
1 answer
51 views

Simplify to vectors and matrices [closed]

How do you simplify an expression: $[r_1, r_2, r_3]^T [t_1, t_2, t_3] = r_1 t_1 + r_2 t_2 + r_3 t_3 = \vec{r}^T \vec{t}$ In other words, I want to group and simplify scalar expressions over vectors / ...
user3180's user avatar
  • 121
2 votes
1 answer
47 views

How to explore the unchanged eigenvalue with the largest real part?

The provided code below employs the Chebyshev collocation method to calculate eigenvalues. I'm interested in examining the eigenvalue with the largest real part while ensuring it remains almost same ...
Fun123's user avatar
  • 47
2 votes
2 answers
59 views

Generalized scalar product for matrices

Let $X$ and $Y$ be matrices of a dimension $ m \times n $. I would like to keep $m$ and $n$ as a variable and define a scalar function $$ \operatorname{scalar}: X , Y \to \mathbb R$$ $$ \...
100xln2's user avatar
  • 413
0 votes
1 answer
58 views

Solving the system of equation with the expression of total differentiation using Cramer's rule

I want to solve the following system of equations of total differentiation using Cramer's rule. And I got the following message: where d is delta as the symbol of ...
jck21's user avatar
  • 113
0 votes
2 answers
100 views

How to find codewords from constraint equations? [closed]

I have edited this question to include more information about what algorithm I wish to use etc. Say if I have a linear binary code with parity check matrix $$H = \begin{bmatrix} 0 & 1 & 1 &...
Aislin_367's user avatar
1 vote
1 answer
126 views

What is mathematica command for finding eigenvalues of a generalized eigenvalue problem?

The provided code below is designed to compute the eigenvalues for the problem I inquired about earlier in this post: How to find eigenvalues?. I believe my code is mostly accurate, with the exception ...
Fun123's user avatar
  • 47
2 votes
2 answers
101 views

Problem of RollPitchYawAngles and orthogonalize

...
HyperGroups's user avatar
  • 8,509
3 votes
2 answers
91 views

Eigenvalues and classification of critical points [closed]

I started with a function (x,y) and tried to write the code to work out the eigenvalues and classify the critical points. The output it all good up until I try to use Which[] to classify the critical ...
noodles's user avatar
  • 31
1 vote
0 answers
56 views

Eigenvectors of a matrix (Solving and Plotting)

Given a nxn matrix h[k] ...
Med Ch's user avatar
  • 105
0 votes
0 answers
40 views

How to find linearly independent linear combinations of a set of vectors (general case)

If I have a list of vectors, say $v=\{v_{1}, v_{2}, \dots ,v_{n}\}$. Is there a way that I can get all linearly independent linear combinations of these vectors, such that if I change the content of ...
Aislin_367's user avatar
2 votes
1 answer
81 views

how to solve problem involving a condition?

I am new to mathematica, therefore this might be a pretty simple question, My problem is for example: Compute the eigenvalue for matrix A= {{1,c},{1/c,1}}, c>0. when the matrix becomes more ...
Zeriob's user avatar
  • 23
8 votes
1 answer
305 views

How can I prevent conversion of a SparseArray to a DenseArray?

The Problem I'm trying to implement an efficient Whitker-Eliers smoother in Mathematica. In Matlab, this is a few lines of code (taken from the SI of the above paper): ...
BesselFunct's user avatar
1 vote
2 answers
82 views

Radially symmetric SmoothHistogram3D?

I have a sample from a distribution invariant w.r.t rotations around 0. What's the best way to incorporate this information into a smooth 3D histogram? ...
Yaroslav Bulatov's user avatar
1 vote
1 answer
61 views

Eliminate a variable from two equations with trigonometric functions

I am trying to eliminate theta from the following two equations but in vain. I tried the command Eliminate and Reduce. ...
qahtah's user avatar
  • 1,329
1 vote
0 answers
95 views

Mathematica fails to correctly recognize Hermitian matrix

I have a Hermitian matrix, but Mathematica gives 'False' when I try with HermitianMatrixQ. ...
Sayandip Ghosh's user avatar
0 votes
0 answers
56 views

Derivative chain with matrix exponential

I have defined the following functions: ...
abc240164's user avatar
1 vote
0 answers
78 views

Getting behavior around 0 for spectrum of product of Gaussian matrices?

Edit the math part was answered in mathoverflow, I'm now looking on how to port this to Mathematica to check against observed fit Consider a product of $k$ independent square matrices with IID ...
Yaroslav Bulatov's user avatar
0 votes
0 answers
75 views

Why does `LinearSolve` give this solution for a singular matrix?

I want to solve the matrix system Ax+b==0, the equation is as follows (In MATHEMATICA code, I use AA and ...
fhrl's user avatar
  • 119
2 votes
1 answer
114 views

Does the solution exist in this matrix system?

I got these equations after the post process, so I just listed the numerical equations, and there are 50 equations total with 50 unknown variables, however, the ...
fhrl's user avatar
  • 119
0 votes
0 answers
32 views

Solution to a vector recurrence equation

Suppose $n\ge1$ is fixed. Let $C_1,C_2,\ldots,C_n$ be given constants. Consider the recurrence $$ C_n[S_{1}^{(n)},S_{2}^{(n)},\ldots,S_{n-1}^{(n)}]= \left[\binom{n}{1},\binom{n}{2},\ldots,\binom{n}{n-...
Alex's user avatar
  • 755
0 votes
1 answer
67 views

Comparing two power series and extracting their coefficients

I have a standard mathematical problem that I was wondering how to solve efficiently by mathematica. Here is the problem. I have two power series expansions of a function ...
Physics Moron's user avatar
3 votes
1 answer
270 views

SVD decomposition with optimization

Let's suppose there is a matrix A nxn, which will be decomposed into SVD: where ui and vi are singular vectors composing matrix U and V. sigma is a vector that contains the eigenvalues. In ...
Cairo Martins's user avatar
5 votes
2 answers
192 views

Reshaping sparse arrays to have extra index

I have an $n \times m \times p$ array, let's call it $r$. I want to obtain an $n \times m \times p \times 5$ array (let's call it $q$) where $q$ is the same as $r$ except that every non-zero component ...
Facieod's user avatar
  • 175
1 vote
0 answers
66 views

Solving system of linear equations in specific order

I know how to solve set of linear equations using Solve, or by hand of course. However, my current problem requires me to solve the equations in a specific order, ...
Lelouch's user avatar
  • 479
0 votes
1 answer
73 views

Eigenvalue function finds real eigenvalues for antihermitian matrix

If given a (large) antihermitian matrix, Mathematica occasionally finds real eigenvalues although the in-build function AntihermitianMatrixQ confirms it to be antihermitian. The matrices for which I ...
qising's user avatar
  • 43
2 votes
1 answer
108 views

MatrixExp[] for 4 by 4 matrix gives an unavailable answer [duplicate]

Q = ( { {-7, 1, 2, 4}, {2, -4, 1, 1}, {2, 2, -6, 2}, {1, 1, 1, -3} } ) MatrixExp[Q*t] I defined the matrix Q and executed the command. Then I ...
jerryed321's user avatar
0 votes
2 answers
53 views

Transformation invariant subspace of three-component array

I have a large sparse array A with dimensions $m \times n \times q $. I also have two transformation matrices, B ($n \times n$) ...
Facieod's user avatar
  • 175
0 votes
0 answers
39 views

How to judge whether this equation group really has no solution?

I have got the following equation using the following code after the preprocess. The preprocess is complicated so cannot be displayed here in limited scale, and assuming that the following equations ...
fhrl's user avatar
  • 119
3 votes
0 answers
77 views

Calculate the integral of the Slater determinant

This is a Slater determinant: $$ s=\left|\begin{array}{ll} \psi_{1 s}\left(r_1\right) \alpha & \psi_{1 s}\left(r_1\right) \beta \\ \psi_{1 s}\left(r_2\right) \alpha & \psi_{1 s}\left(r_2\right)...
我心永恒's user avatar
  • 1,382
0 votes
2 answers
86 views

How to get Mathematica to carry out my computation of a vector norm fully?

I am relatively new to Mathematica, and I have come across the problem where Mathematica often doesn't seem to carry out calculations fully. For example: I have a vector v and want to find its norm, ...
Q.Ask's user avatar
  • 15
0 votes
3 answers
125 views

Incorrect number # of eigenvectors for eigenvalue

I have the following code: ...
kowalski's user avatar
  • 375
1 vote
4 answers
117 views

How to obtain the linear equation passing through two coordinates?

{-Sqrt[5], 0}, {3/Sqrt[5], 4/Sqrt[5]} How to automatically obtain the straight line equation passing through two points with the coordinates of the two points as ...
csn899's user avatar
  • 2,705
1 vote
0 answers
80 views

Gaussian Matrix Model - Large N Expansion Physics with Mathematica

Update: Attempted 2nd time by replica method I'm trying to implement basic large N expansion in Mathematica. I'm trying to understand what this means on the fly as well. The model I am trying to ...
kevin Tah N.'s user avatar
7 votes
2 answers
292 views

Show steps in finding the reduced row echelon form of a symbolic matrix

I would like to figure out a way to see the row operations RowReduce uses to arrive at the reduced row echelon form of a symbolic square matrix. Solutions that show ...
granular bastard's user avatar
-2 votes
2 answers
87 views

Find an orthonormal basis for column space without Orthogonalize [duplicate]

How can I find an orthonormal basis for column space of the following matrix without using Orthogonalize? $$ \begin{bmatrix} -10 & 13 & 7 & -11 \\ 2 &...
Collier McRae's user avatar
2 votes
0 answers
58 views

Computing residue of the resolvent

I'm looking at this Mathematica tutorial where the author defines matrix function by summing over (matrix-valued) residues of the resolvent. ...
Yaroslav Bulatov's user avatar
8 votes
1 answer
115 views

Rank of singular, large, sparse matrices

I need to find the rank (and eventually do the Gaussian elimination) of a large, sparse, non-square matrix of integers. There are a few methods in Mathematica to find the rank of a non-square matrix (...
Albercoc's user avatar
  • 946
4 votes
3 answers
260 views

How can I construct a determinant-type differential operator?

How can I construct a determinant-type differential operator, where the multiplication of elements in the determinant represents the composition of multiple differential operators? \begin{align*} \...
D.Matthew's user avatar
  • 217

1
2 3 4 5
32