+inline Matrix<T, M, N>::Matrix()
+{
+ std::fill(data, data+M*N, T());
+}
+
+template<typename T, unsigned M, unsigned N>
+inline Matrix<T, M, N>::Matrix(const T *d)
+{
+ std::copy(d, d+M*N, data);
+}
+
+template<typename T, unsigned M, unsigned N>
+template<typename U>
+inline Matrix<T, M, N>::Matrix(const Matrix<U, M, N> &other)
+{
+ for(unsigned i=0; i<M; ++i)
+ for(unsigned j=0; j<N; ++j)
+ element(i, j) = other(i, j);
+}
+
+template<typename T, unsigned M, unsigned N>
+inline Matrix<T, M, N> Matrix<T, M, N>::identity()
+{
+ static_assert(M==N, "An identity matrix must be square");
+ Matrix<T, M, N> m;
+ for(unsigned i=0; i<M; ++i)
+ m(i, i) = T(1);
+ return m;
+}
+
+template<typename T, unsigned M, unsigned N>
+inline Matrix<T, M, N> Matrix<T, M, N>::from_columns(const Vector<T, M> *v)