How to Merge a Matrix and a Vector into Coordinate Pairs?

  • Context: Mathematica 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Coordinates Matrix
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 2K views
member 428835
Hi PF!

Given a matrix and vector $$
\begin{bmatrix}
a & b & c\\
d & e & f
\end{bmatrix},\\
\begin{bmatrix}
1\\
2
\end{bmatrix}
$$

how can I merge the two to have something like this

$$
\begin{bmatrix}
(1,a) & (1,b) & (1,c)\\
(2,d) & (2,e) & (2,f)
\end{bmatrix}
$$
 
Physics news on Phys.org
Python has tulles and lists of lists that look like matrices. A tuple is basically an ordered collection of different items (123, 456, ‘name’).

What language are you thinking about?
 
Okay I didn’t notice that.

Here’s some Mathematica array creation methods.

https://reference.wolfram.com/language/ref/Array.html
The last one looks like it constructs something what the OP wants.

246823