Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
45 views

How can I convert a vector to a matrix?

I have an eigen vector, λ1, and I want to convert it to a matrix for use. How can i do this? ...
0
votes
2answers
72 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
96 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
109 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 ...
1
vote
1answer
57 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
154 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
0answers
24 views

Animate combined with graphic3D makes vector disappear

I am animating a point that moves along a curve. Moreover, I am also plotting three changing vectors that exit from that point and have changing length. What happens is that sometimes I encounter ...
-1
votes
1answer
46 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
75 views

How to solve equation defined on n-dimensional vector space

I'm new to Mathematica and I'd like to solve a vector equation defined on n-dimensional vector space. I've tryed this: ...
0
votes
1answer
30 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
37 views

Hessian matrix product in Taylor expansion of vector function

I am trying to get the 2nd order coefficient of the Taylor expansion at $\pmb{x}=\pmb{0}$ of ...
1
vote
1answer
53 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
58 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
60 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
39 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
120 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
80 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
140 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
52 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
69 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
47 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
53 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
99 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
176 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
121 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
445 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
82 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
88 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
146 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
210 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
35 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
72 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
116 views

Why is TensorExpand so slow for vector operations?

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

How to simplify tensor expression with symbolic coeficients?

I can use Vectors to simplify the following expression: ...
16
votes
1answer
187 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
31 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
54 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? ...
1
vote
0answers
43 views

Vector calculations in unspecified dimension

So I would like to be able to do operations on vectors, while leaving the dimension $N$ of the vector space unspecified. As a simple example, I would like to be able to define the unit vector $e_i = ...
8
votes
2answers
273 views

Confused about the solution obtained from vector linearization

I am trying to linearize a vector expression $$\frac{(\mathbf{u}+d\mathbf{u})\times(\mathbf{v}+d\mathbf{v})}{\vert(\mathbf{u}+d\mathbf{u})\times(\mathbf{v}+d\mathbf{v})\vert}$$ Here is my code ...
1
vote
1answer
64 views

How can I transform a density plot into a stream plot?

I have a table with three columns: x, y and z, where z is a function of x and y. Right now, I have a ListDensityPlot of z (below). Is it possible to plot a stream plot of this data, so that arrows go ...
4
votes
2answers
248 views

Handling arrays

Is there a way to transform a matrix in a vector, where you choose the order of the arrangement? I used ArrayReshape but this command chooses its own arrangement, ...
4
votes
3answers
173 views

How to make vector field plot from NDSolveValue Solution?

I am solving Laplace equation on circular domain from which i get solution for potential. The code I used: ...
1
vote
0answers
42 views

Simplifying results of a vector function to be nested (SECOND UPDATE)

(Oddly enough, the title for another question that ended up dealing with an unrelated problem could have worked better here, but I didn't want to plagiarize.) Given a symbolic vector function ...
1
vote
0answers
78 views

How to query Wolfram Alpha to find projection of point on plane? [closed]

For example, the projection of the point $P=(1,2,3)$ on the plane $x+y+z=3$ is the point $Q=(0,1,2)$. How do I ask Wolfram Alpha to compute this? I've tried "projection of point (1,2,3) on plane x+y+...
1
vote
1answer
30 views

Obtain needed Kronecker products from output of Eigensystem[]

Eigensystem[M] gives a list of the eigenvalues and eigenvectors of the square matrix M, i.e. {{val1,val2,...},{vec1,vec2,...}}. I need a routine that will ...
4
votes
1answer
113 views

Introduction to Vectors and NDSolve with System of Equations

This question is similar to an older question but with a system of equations. I have two equations that I want to solve with NDSolve, and here's a similar minimal ...
0
votes
1answer
38 views

With equation of vector fields which are in cylindrical polar coordinates, how to plot 3-D vector field? [closed]

I have the equation of vector fields which are in cylindrical polar coordinates. How do I plot 3-D vector field? I never used Mathematica. Edit2: ...
3
votes
1answer
191 views

Finding optimal rotation matrix

I have vectors E1 = {22.607, 3.495, -30.795}; and R1 = { 4.74061, 21.7549, 30.6501};. This vectors are conneted by a 3D rotation ...
7
votes
3answers
457 views

Rotating Vectors in space

I have two sets of vectors, ...