title: Broadcasting (two) vectors in Eigen C++
body: <p>Suppose I have an input ArrayXd of size 3:     </p>
  
  <pre><code>P[1]                   
  P[2]                 
  P[3]                 
  </code></pre>
  
  <p>My required symmetric MatrixXd is of size [3,3]:</p>
  
  <pre><code>-P[1]*P[1]+P[1]   -P[2]*P[1]         -P[3]*P[1]  
  -P[1]*P[2]        -P[2]*P[2]+P[2]    -P[3]*P[2]
  -P[1]*P[3]        -P[2]*P[3]         -P[3]*P[3]+P[3] 
  </code></pre>
  
  <p>Solution in pseudo code:   </p>
  
  <pre><code>-1.0 * P.broadcast.rowwise() * P.broadcast.colwise() + diag(P)
  </code></pre>
  
  <p>Problem: 
  The Eigen manual explains that you can broadcast a vector, but only in combination with a Matrix (or two-dimensional Array). How is it done with two vectors?</p>