# create a rank 1 matrix from two vectors

I've seen the answers 1 and 2 about the transposition and creation of rank $$m$$ matrices.

What I'd like to do is first create a random vector, which I know how to do with

d = 3;

a = RandomReal[{-3, 3}, {d}]

and then create the matrix $$A=\begin{pmatrix} a_1\\a_1\\a_3\end{pmatrix}\cdot(1,1,1)=\begin{pmatrix}a_1&a_1&a_1\\ a_2&a_2&a_2\\ a_3&a_3&a_3\end{pmatrix}$$

But MatrixForm[a.Transpose[{1, 1, 1}]] doesn't work.

Edit:

I randomly ran the line TensorProduct[a, {1, 1, 1}] and that works (didn't expect to find an answer like that)

That's precisely what a KroneckerProduct is:

KroneckerProduct[{a1, a2, a3}, {1, 1, 1}]
(*    {{a1, a1, a1}, {a2, a2, a2}, {a3, a3, a3}}    *)


 d = 3;
a = RandomReal[{-3, 3}, {d}];
a /. {x_, y_, z_} -> {{x, x, x}, {y, y, y}, {z, z, z}}

(* {{1.62507, 1.62507, 1.62507}, {2.03748, 2.03748,
2.03748}, {-0.478757, -0.478757, -0.478757}}  *)


and

Map[Times[#, {1, 1, 1}] &, a]
(* {{1.62507, 1.62507, 1.62507}, {2.03748, 2.03748,
2.03748}, {-0.478757, -0.478757, -0.478757}} *)


Have fun!

The operation you are looking for with your two vectors is the outer product. Hence:

a = RandomReal[{-3, 3}, 3];
b = RandomReal[{-3, 3}, 3];
Outer[Times, a, b]


gives the matrix.