             NSException(name: "Column index out of bound", reason: "The column index range is out of bounds. Range \(columnRange) given, but matrix column range is \(0..<self.dimensions.columns) .", userInfo: nil).raise()
         }
         
-        var matrixElements = [[T]]()
+        var elementsList = [T]()
         
         for row in rowRange {
-            
-            var rowElements = [T]()
-            
             for column in columnRange {
                 
-                rowElements.append(self[row][column])
-            }
-            
-            matrixElements.append(rowElements)
-        }
-        
-        return Matrix(matrixElements)
+                elementsList.append(self.element(row, column))
+            }
+        }
+        
+        return Matrix(elementsList: elementsList, rows: rowRange.endIndex - rowRange.startIndex)
     }
     
     

        
        for i in 0 ..< self.dimensions.rows {
            
            self.elements[i][index] = newColumn[i]
        }
    }
    

            NSException(name: "Row index out of bounds", reason: "The requested row's index is out of bounds.", userInfo: nil).raise()
        }
        
        var elementsList = [T]()
        
        for i in index * self.dimensions.columns ..< (index + 1) * self.dimensions.columns {
            elementsList.append(self.elementsList[i])
        }
        
        return Vector(elementsList)
    }
    
    
