# Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

597 questions
Filter by
Sorted by
Tagged with
83 views

### Calculating power series of quantum operators on kets

I am using the "Quantum" add-on package to perform some quantum mechanical calculations using SU(1,1) generators. The code that I've developed reads ...
60 views

### streamplot for differntial equation

how I can use StreamPlot or VectorPlot to show x[t] and 1-x[t] and show convergence point in my plot with a different colour like a blue point? ...
1 vote
60 views

### Find binary vector within fixed distance to reference vector that maximizes the number of distances to a set of vector that are below a threshold

Input: A binary reference vector $r$, a multi-set of binary vectors $S$, and a distance function d between binary vectors of equal length. Assume that $r$ and all vectors in $S$ have the same length. ...
1 vote
76 views

### LinearOptimization - how to solve with vector constraints?

I have the following linear program that I am able to solve in MATLAB. However, I want to move to Mathematica. For some fixed constants $n$, $\delta$ and $\varepsilon$ and fixed $(n+1)$-dimensional ...
53 views

### Solving a vector diferential equation lead to ComplexInfinity Encountered non-numerical value for a derivative at t == 0

I'm trying to solve the following Vector PDE: I implemented the following code: ...
1 vote
44 views

### Using Through function with vectors

I have the vectors defined as follows: v1={x1,y1,z1}; v2={x2,y2,z2}; v12=v2-v1; v21=v1-v2; I am passing an integer function for iteration purpose as follows: ...
230 views

### How to do column vector concatenation

Is it a way to do column vector concatenation? u = {{1},{-1},{0}}; v = {{0},{1},{-1}}; w = {{-1},{0},{1}}; I would like a matrix of {u,v,w}
61 views

### Spherical Polar Coordinates VectorPlot3D

I understand the VectorPlot3D function allows you to plot a 3D vector ${Vx,Vy,Vz}$ as a function of $x,y,z$. Is there a function that allows you to plot in ...
1 vote
77 views

### VectorAngle[] relative to specific origin?

VectorAngle[] computes the angle between two vectors from the origin (I assume {0.0, 0.0, 0.0}). Can we use a reference point ...
191 views

### VectorColorFunction not working at a few points

I use the following data to ListVectorPlot a vector field with the color indicating the vector direction. However, there seem to be some vectors not colored ...
50 views

### How to express elemental operations in matrix form?

I ran the following code: X = Array[x, {5, 4}]; W = Array[w, {4, 3}]; Y = Array[y, {5, 3}]; D[Norm[X.W-Y, "Frobenius"]^2, {W}]//MatrixForm However, mma ...
75 views

### Speed up dot and cross products for a list of vectors, in a "brick wall" pattern

Yesterday I asked a question on how to speed of computation of dot and cross products for a list of vectors, for which I received a nice answer from Henrik Schumacher. Now I have a follow up question ...
304 views

### Speeding up cross and dot products for a list of vectors

I am working on a code where I perform dot and cross product operations on a large list of vectors multiple times. I am using MapThread to achieve this but I feel the speed of operation is not up to ...
67 views

### Matrix basis using Orthogonalize

I have four matrices, ...
1 vote
80 views

### Convert a polynomial to a vector [duplicate]

I am trying to transform a generated polynomial terms into a vector, I used the command 'MonomialList', ...
56 views

### Total Spin Matrix Squared (Casimir Operator)

I am trying to get Mathematica to compute the Casimir operator of a 4 particle system of spin $1/2$ fermions. I have the following code which does not do what I would like it to. ...
72 views

### How to matricize a vector?

I am wondering how to represent a vector as a matrix, using specified dimensions. For example, MatrixForm[{a, b, c, d}] gives me a column vector. But I would want ...
94 views

### How do I find the unit vector in the direction of the minimal rate of change?

A ball falls on the surface $x^4 z+x^9 y^2+y^2 z^3=65$ at the point (-1,-3,2). How do I find a three-dimensional unit vector in the direction that the ball will begin to roll. I know that the ball ...
151 views

### How to subtract a list from certain sublists of a list? [closed]

I have a problem in doing an operation on this vector {{2,3},{3,4},{5,6}}-{1,1} I want to minus this to get the result ...
1 vote
154 views

### Solving equation set with vectors

I have six unit vectors in real $3$D space v1,v2,v3,v4,v5,v6; Represent the dot product between some of the vectors as the Cos ...
63 views

My code is ...
40 views

### Reduce expressions into (simplified) matrix and vector forms

I have some computation that results in a rather complicated looking expression that could be much simplified by converting it into matrix or vector expressions. For example, instead of ...
134 views

71 views

### How can I remove the attributes "Orderless" from function Times stably and reliably?

Recently I have been doing some algebra of partitioned matrices, where product like below is common: where $A_{11}, A_{12}, X, Y$ are all partitioned matrix blocks thus all are matrices in essence. ...
107 views

### dot product and norm [closed]

Can you solve the following problem in mathematica program? Thank you. Let x=(x1,x2,x3),y=(y1,y2,y3) and ⟨x,y⟩=x1y1+2x2y2+x3y3 be an inner product in a three-dimensional real vector space. Define the ...
63 views

### Can I use assumptions to declare a variable's type?

I'm trying to declare $P$ as a vector. I searched for a while, the closest way seems to be Assumptions: ...
90 views

### Bug with ListVectorPlot in 12.3.1?

Bug fixed in 13.0.0 The documentation shows that result of ...
47 views

### Why does the dot product between a matrix and a vector not work? [duplicate]

Executing this code: ...