Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

1
vote
0answers
19 views

Text misalignment in vector graphic format export

In converting a number of old notebooks into a format for e-readers, Mathematica has some issues with vector formats. SVG export would have been ideal to use, but the exporter fails to recognize, for ...
0
votes
0answers
45 views

Understanding Transpose, dot and at [on hold]

I found this formula Transpose[{Tv1, Tv2}].Inverse@Transpose@{v1, v2}.{x, y} in some post but lost the link. Now I need to understand why this formula solve my ...
1
vote
2answers
46 views

How to define multivariable vector funtion? [closed]

I would like to define a function of variables having two components as $u(x,y) = (f(x,y),g(x,y))$. I defined such a function as u[x_, y_] := {f[x, y], g[x, y]} ...
1
vote
2answers
57 views

How to make a 1D VectorPlot

I am trying to use VectorPlot to produce a 1 dimensional vector plot. I Have tried using VectorPoints->{10,1} but it produces ...
0
votes
0answers
31 views

Plotting a point beneath the surface of a sphere [closed]

I'm trying to represent a point beneath the surface of the earth. I can plot coordinates based on latitude and longitude to get a point directly above where it's supposed to be, but now I need the ...
4
votes
2answers
67 views

ProbabilityDistribution with variable number of dimensions

I would like to construct a ProbabilityDistribution with a variable number of dimensions. I tried to use $Assumptions = x ∈ Vectors[d, Reals] so that the variable <...
1
vote
1answer
90 views

Multivariate series for approximating implicit system

I'm trying to approximate the solution of an implicit set of equations by means of a Taylor series. I have managed to do so for a solution expressed in terms of a single independent variable, by using ...
2
votes
2answers
48 views

Normalize a vector: error [duplicate]

I have this simple example in which I am trying to write a column vector (ket vector) and then I want to normalize it. It seems that ther is something wrong, leading to an error message "The first ...
0
votes
0answers
17 views

Multiplication of Two Vectors Not working correctly [duplicate]

I am trying to simply multiply a 1x2 vector by its transpose however Mathematica is not performing this action correctly. When I change to 2x2 matrices the multiplication works correctly however. My ...
-1
votes
1answer
66 views

How can I calculate the time-series of a vector?

I need to calculate a time-series of the vector $\|\theta(t)\|=2.2^{-t}\|v(t)\|$ where $t$ for 10 time-steps. I was thinking of expressing the vector as a list of functions, and then the functions ...
0
votes
0answers
109 views

Why can't Nsolve find the solutions for my equations?

I have a problem using NSolve in my Mathematica code. In my Code NSolve should find a value for qw, but it won't. The strange ...
1
vote
2answers
47 views

Find n-roots of unity and put them in vector [closed]

Assume you want to find all roots of n-unity and then you want to put them in a vector. I tried to find all the roots of unity this way: Solve(z^n==1,z) But now ...
7
votes
1answer
627 views

Can we turn this for loop into a more elegant Mathematica code?

I am coding stuff manipulating indirection arrays and I have some code like: ...
0
votes
0answers
53 views

Why am I getting results containing Re and Conjugate?

Using the matrix Ham4LVLReg1, I am trying to get four vectors. Initially, I got the eigenvectors, and then, I computed the eigenvectors ...
1
vote
2answers
56 views

Joining $4 \times 1$ vectors defined through functions to form a $4 \times n$ matrix

I define a $4x1 $column vector through a variable as: Z[i_]:=List[{a[i]},{b[i]},{c[i]},{d[i]}] I then want to make a $4\times n$ matrix by joining a specified ...
0
votes
2answers
57 views

What's wrong with this cross product of two vectors? [closed]

x = {{a},{b},{c}}; y = {{d},{e},{f}}; Cross[x,y] Whe trying to evaluate this expression, I get the error ...
0
votes
2answers
85 views

Verifying equality $ (\vec a \times \vec b)^2 = \left| \vec a \times \vec b \right| ^2 $

I'm trying to verify the equality $ (\vec a \times \vec b)^2 = \left| \vec a \times \vec b \right| ^2 $ in Mathematica. How can I do it? Thank you for your time.
2
votes
1answer
122 views

Plotting Vectors in Mathematica

I'm trying to plot 2D vectors in Mathematica. Built in functions don't really work for me because I want to plot vectors of matrices from the origin to the their coordinates with an arrow on their ...
3
votes
3answers
119 views

using DeleteCases to delete vectors with particular index as 0

Assume I have a set of vectors set = {{0,1,1,0,1}, {1,0,1,1,1}, {1,1,1,1,0},{1,0,0,1,0}}. I want to delete the vectors which have the last entry as 0. In the ...
3
votes
2answers
109 views

Animating a Vector Field

I am trying to create animations of a time dependent vector field $\vec v(t,x,y)$. The problem is that VectorPlot scales the vectors for each time $ t $ separately ...
1
vote
2answers
289 views

Orthogonal Projection of vector onto plane

I'm currently trying to learn Mathematica, and I've got some linear algebra tasks to solve with it. I've gotten quite far but now I'm stuck on this one exercise. The instructions are: With the help ...
-1
votes
1answer
53 views

Plotting Base-vectors not working properly [closed]

I'm stuck on a issue that I can't seem to solve. After defining values for V, W and x, I'm supposed to Plot two base-vectors in the base V and with the vector x in the same picture. I'm supposed to ...
0
votes
1answer
31 views

VectorPlot not showing up after switching computers

So typed the below code into my personal computer and it worked just fine. I then moved the file to my work computer so I could look at it there, and now VectorPlot comes up blank. I am not sure if ...
1
vote
1answer
57 views

What is the best way to compute the set of vectors normal to a given one?

For 2D vectors, computing the vector orthogonal to a given $v$ is straightforwardly done using Cross, as for example shown here. However, ...
1
vote
1answer
62 views

Calculate angle between skew vectors

I want to use Mathematica to calculate the angle between two vectors (say a and b) that don't lie in the same plane. The vectors ...
2
votes
1answer
68 views

3 dimensional vector representation with Hue color data

I am trying to represent 3-dimensional vectors in a 3-dimensional space. In my field, there is a common color coding (color wheel) as in the picture. For (vx,vy,vz) vectors: (0,0,1) is white, (0,0,-...
1
vote
1answer
42 views

Representing 3D vectors, manipulating them, and identifying symmetry operations [closed]

I am sure this is relatively straightforward, but I feel like I am missing some basic knowledge to let me find the answer. I have a list of 3D vectors not (necessarily) originating at the origin. ...
2
votes
2answers
122 views

Problem verifying expression with 3D vectors

I am unable to verify that my vector expressions are equivalent. I want it to say true or false. ...
4
votes
2answers
94 views

Explicitly construct tensor quantities with given symmetries

I am trying to use mathematica to generate explicitely a tensor. I know multiple thing about it. Let's call it $C_{\mu\nu\lambda\sigma}$. This guy has to be symmetric in the two first indices ${\mu,\...
4
votes
1answer
148 views

Summation of Kronecker deltas should give the dimension

I have a really simple problem but I don't know how to solve it. Basically, I am doing vecor manipulation and I am summing a lot of Kronecker delta here and there. How can I teach Mathematica that for ...
2
votes
2answers
56 views

How to write a matrix of $n\times 2$ where the first column is made of only 1's?

How to write a matrix of $n\times 2$ where the first column is made of only 1's? Suppose I have a vector x={.24,...,10}. How can I get this $\left( \begin{matrix} 1 & .24 \\ 1 & ...
1
vote
2answers
73 views

Evaluating a formula that uses summations and products of vectors

Could someone tell me how to find beta1? I have the following data: I don't know how to write beta1, and I don't find ...
0
votes
1answer
48 views

Recombining vectors after taking derivatives

I want to map two expansions order by order and to solve to get unknowns coefficient. We define $X_{\mu}= \frac{(x-y)_{\mu}}{(x-y)^2}$. The quantity I need to expand in the end is $t_{\mu\nu}= \frac{...
0
votes
1answer
70 views

Drawing several 2D vectors in one plot with labeled axes [duplicate]

I want to draw vectors just with one plot. Also, I want to label the axes. Can anybody show me how can I do it?
1
vote
2answers
163 views

Change the colors of vectors?

I'm using ListVectorPlot to draw vector fields. Is it possible to change the colors and also the types of the vectors?
4
votes
1answer
198 views

Multiplying list of matrices with vector of scalars

there are many similar threads on this forum, but none of them fixes my problem. I am trying to multiply List of Pauli Matrices with a vector of symbols (which are scalars). ...
3
votes
2answers
199 views

Plot a level curve and its gradient

Suppose that I have the following ellipse function, $f(x,y)=4x^2+y^2-5$. The gradient of this ellipse is calculated as $\nabla f(x,y)=[8x,2y]$. I know how to plot and join them. It is easy. I do ...
10
votes
3answers
461 views

Remove Abs from Norms of Vectors

I have the following norm Norm[{a, b*c}] (* Sqrt[Abs[a]^2 + Abs[b c]^2] *) How do I remove the Abs from it? ...
1
vote
1answer
86 views

Sum of vectors to follow a path [closed]

I'm working with a mathematica program where I have a matrix with the xyz coordinates of the begin and the end of a group of vectors (randomly), here is the image: How can I sum two vectors where ...
5
votes
1answer
104 views

Finding the orthogonal diagonalizing similarity of a symmetric matrix

I'm aware that there are some questions similar to this here, but none that could solve my problem. So, I have to diagonalize a symmetric symbolic matrix $m$ (to be seen below) and obtain the ...
4
votes
1answer
154 views

multiply two vectors, component by component [closed]

Would like to take two vectors and multiply components at the same index.For example {a1, a2, a3} x {b1, b2, b3} to produce {a1 b1, a2 b2, a3 b3}. The following works, but are there some alternatives?...
3
votes
2answers
214 views

How to get vector a from known inner product?

Assuming that a.b=z,where b={b1,b2,b3} and z=x b1+y b2+z b3, obviously ...
-1
votes
1answer
36 views

column space having non-linear combinations of basis vectors [closed]

I have a matrix $A_{3x3}$ whose basis for the column space are $a_{1}=(2,2,5)$, $a_{2}=(9,5,3)$ and $a_{3}=(3,6,1)$. If these are the basis for the column space, then column space can always be ...
1
vote
1answer
73 views

Abstract vector algebra with scalars

I am interested in expanding a vector expression in terms of the scalar parameter, but it doesn't give the expected result ...
3
votes
2answers
120 views

Why is TensorExpand so slow for vector operations?

I would like to expand the following tensor expression: ...
7
votes
2answers
152 views

How to simplify tensor expression with symbolic coeficients?

I can use Vectors to simplify the following expression: ...
16
votes
1answer
200 views

How can I reliably plot ellipse-field streamlines?

I am trying to replicate some standard structures in the study of ellipse fields in Mathematica, and I'm having much more trouble than is really reasonable, so I'd like to put this on the floor here ...
0
votes
1answer
33 views

Integrating a vector according to elements of another vector

I have two vectors, $\bar{x},\bar{v}$ and I want to produce a third vector such that:$$ u_i = \int_{x_i}^{x_i+\delta} f(v_i,t)dt \ .$$ I tried (with a simple function for example): ...
1
vote
1answer
51 views

wrong answer on mathematics when adding vectors

can anyone know how to solve this simple problem: {{3}, {0}, {3}, {0}} - Fout /. Fout -> {{0}, {0}, {1}, {1}} {{3}, {0}, {3}, {0}} - {{0}, {0}, {1}, {1}} ...
0
votes
1answer
57 views

Resultant of two force vectors

Vector 1 is 80 degrees counterclockwise from the X axis and 150 Newtons in magnitude Vector 2 is 15 degrees counterclockwise from the X axis and 100 Newtons in magnitude What is the resultant vector? ...