Index: src/Matrix.cpp
===================================================================
--- src/Matrix.cpp	(revision 8e17d683057bcb99b7dfa0c1a4d6d4952428b9ad)
+++ src/Matrix.cpp	(revision 3dbb9d0898f6f18f42bd3d2c9f115ece51b8e6b6)
@@ -25,4 +25,5 @@
   content = new MatrixContent();
   content->content = gsl_matrix_calloc(NDIM, NDIM);
+  createViews();
 }
 
@@ -41,4 +42,5 @@
   set(1,2, src[7]);
   set(2,2, src[8]);
+  createViews();
 }
 
@@ -47,21 +49,48 @@
   content->content = gsl_matrix_alloc(NDIM, NDIM);
   gsl_matrix_memcpy(content->content,src.content->content);
+  createViews();
 }
 
 Matrix::Matrix(MatrixContent* _content) :
   content(_content)
-{}
+{
+  createViews();
+}
 
 Matrix::~Matrix()
 {
+  // delete all views
+  for(int i=NDIM;i--;){
+    delete rows_ptr[i];
+  }
+  for(int i=NDIM;i--;){
+    delete columns_ptr[i];
+  }
+  delete diagonal_ptr;
   gsl_matrix_free(content->content);
   delete content;
 }
 
+void Matrix::createViews(){
+  // create row views
+  for(int i=NDIM;i--;){
+    VectorContent *rowContent = new VectorViewContent(gsl_matrix_row(content->content,i));
+    rows_ptr[i] = new Vector(rowContent);
+  }
+  // create column views
+  for(int i=NDIM;i--;){
+    VectorContent *columnContent = new VectorViewContent(gsl_matrix_column(content->content,i));
+    columns_ptr[i] = new Vector(columnContent);
+  }
+  // create diagonal view
+  VectorContent *diagonalContent = new VectorViewContent(gsl_matrix_diagonal(content->content));
+  diagonal_ptr = new Vector(diagonalContent);
+}
+
 void Matrix::one(){
-  gsl_matrix_free(content->content);
-  content->content = gsl_matrix_calloc(NDIM, NDIM);
-  for(int i = NDIM;i--;){
-    set(i,i,1.);
+  for(int i=NDIM;i--;){
+    for(int j=NDIM;j--;){
+      set(i,j,i==j);
+    }
   }
 }
@@ -119,4 +148,32 @@
   ASSERT(j>=0&&j<NDIM,"Index j for Matrix access out of range");
   return gsl_matrix_get(content->content, i, j);
+}
+
+Vector &Matrix::row(size_t i){
+  ASSERT(i>=0&&i<NDIM,"Index i for Matrix access out of range");
+  return *rows_ptr[i];
+}
+
+const Vector &Matrix::row(size_t i) const{
+  ASSERT(i>=0&&i<NDIM,"Index i for Matrix access out of range");
+  return *rows_ptr[i];
+}
+
+Vector &Matrix::column(size_t i){
+  ASSERT(i>=0&&i<NDIM,"Index i for Matrix access out of range");
+  return *columns_ptr[i];
+}
+
+const Vector &Matrix::column(size_t i) const{
+  ASSERT(i>=0&&i<NDIM,"Index i for Matrix access out of range");
+  return *columns_ptr[i];
+}
+
+Vector &Matrix::diagonal(){
+  return *diagonal_ptr;
+}
+
+const Vector &Matrix::diagonal() const{
+  return *diagonal_ptr;
 }
 
Index: src/Matrix.hpp
===================================================================
--- src/Matrix.hpp	(revision 8e17d683057bcb99b7dfa0c1a4d6d4952428b9ad)
+++ src/Matrix.hpp	(revision 3dbb9d0898f6f18f42bd3d2c9f115ece51b8e6b6)
@@ -67,4 +67,22 @@
 
   /**
+   * get the ith row of the matrix as a vector
+   */
+  Vector &row(size_t);
+  const Vector &row(size_t) const;
+
+  /**
+   * get the ith column of the matrix as a vector
+   */
+  Vector &column(size_t);
+  const Vector &column(size_t) const;
+
+  /**
+   * get the diagonal of the matrix as a vector
+   */
+  Vector &diagonal();
+  const Vector &diagonal() const;
+
+  /**
    * Calculate the determinant of the matrix
    */
@@ -93,9 +111,10 @@
 private:
   Matrix(MatrixContent*);
+  void createViews();
   MatrixContent *content;
   // we keep around some Vector views of the matrix, to return references
-  Vector* rows[NDIM];
-  Vector* columns[NDIM];
-  Vector* diagonal;
+  Vector* rows_ptr[NDIM];
+  Vector* columns_ptr[NDIM];
+  Vector* diagonal_ptr;
 };
 
Index: src/VectorContent.hpp
===================================================================
--- src/VectorContent.hpp	(revision 8e17d683057bcb99b7dfa0c1a4d6d4952428b9ad)
+++ src/VectorContent.hpp	(revision 3dbb9d0898f6f18f42bd3d2c9f115ece51b8e6b6)
@@ -28,6 +28,8 @@
   }
   virtual ~VectorContent(){
-    gsl_vector_free(content);
-    content = 0;
+    if(content){
+      gsl_vector_free(content);
+      content = 0;
+    }
   }
   gsl_vector *content;
@@ -41,5 +43,7 @@
     content=&view.vector;
   }
-  virtual ~VectorViewContent(){}
+  virtual ~VectorViewContent(){
+    content=0;
+  }
   gsl_vector_view view;
 };
