title: Matrix Multiplication , Tensor Product of Matrices , Matrix transpose and Sub-Matrices
body: <p><br>
  I already asked a part of this question before, but the topic changed now.
  It's not homework.
  I want to find all possible combinations of four basis vectors (dimension = 4), depending on the user input. Repetition should be allowed.</p>
  
  <p>I.e. lets call the vectors 0, 1, 2 and 3.</p>
  
  <p>If the User enters N=3, the combinations can be:</p>
  
  <p>000 001 002 . . . 333</p>
  
  <p>The application should store each combination separately in a (4xN) Matrix. And cout each Matrix.</p>
  
  <p>For example, if:<br>
  "0" is associated with the 4x1 Matrix [column-vector] (0,0,0,0) <br>
  "1" with (0,0,0,1) <br>
  "2" with (0,0,1,0) <br>
  "3" with (0,1,0,0) <br></p>
  
  <p>the possible combination "000" should be stored in the 4x3 Matrix</p>
  
  <p>0 0 0 <br>
  0 0 0 <br>
  0 0 0 <br>
  0 0 0 <br></p>
  
  <p>and this Matrix should be streamed out to the screen.</p>
  
  <p>Moreover the tensor product of every (4x1) Matrix in each of these matrices should be calculated and stored.</p>
  
  <p>In the given example ("x" means tensor product):</p>
  
  <p>0 x 0 x 0 <br>
  . <br>
  . <br>
  . <br>
  3 x 3 x 3 <br></p>
  
  <p>has to be computed and stored separately, since I also need the transpose of these product-matrices.</p>
  
  <p>Another point is, I have to initialize a 2x2 Sub-Matrix in a given p x 2 Matrix.</p>
  
  <p>For this application, I don't want to use a matrix library and I am looking for a fast and efficient way, because the size of the matrices grows exponentially.</p>
  
  <p>Since I am absolutely new to C++, I have no clue, how to code this without a library. I know, it must be something with the STL Container vector, but I am not familiar with it.</p>
  
  <p>Thanks for your help, <br>
  Kepler</p>