diff --git a/src/main/java/org/la4j/matrix/Matrices.java b/src/main/java/org/la4j/matrix/Matrices.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/la4j/matrix/Matrices.java
+++ b/src/main/java/org/la4j/matrix/Matrices.java
@@ -256,6 +256,10 @@ public final class Matrices {
 
         @Override
         public boolean test(Matrix matrix) {
+            if (matrix.rows() != matrix.columns()) {
+                return false;
+            }
+            
             int n = matrix.rows();
             boolean result = true;
             Matrix l = matrix.blank();
Positive-definite matrix has to be a square matrix