title: Using Numpy (np.linalg.svd) for Singular Value Decomposition
body: <p>Im reading Abdi &amp; Williams (2010) "Principal Component Analysis", and I'm trying to redo the SVD to attain values for further PCA.</p>
  
  <p>The article states that following SVD:</p>
  
  <p>X = P D Q^t</p>
  
  <p>I load my data in a np.array X.</p>
  
  <pre><code>X = np.array(data)
  P, D, Q = np.linalg.svd(X, full_matrices=False)
  D = np.diag(D)
  </code></pre>
  
  <p>But i do not get the above equality when checking with</p>
  
  <pre><code>X_a = np.dot(np.dot(P, D), Q.T)
  </code></pre>
  
  <p>X_a and X are the same dimensions, but the values are not the same. Am I missing something, or is the functionality of the np.linalg.svd function not compatible somehow with the equation in the paper?</p>