+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> &m)
+{
+ std::copy(m.data, m.data+M*N, data);
+}
+
+template<typename T, unsigned M, unsigned N>
+inline Matrix<T, M, N> Matrix<T, M, N>::from_columns(const Vector<T, M> *v)
+{
+ Matrix<T, M, N> m;
+ for(unsigned i=0; i<M; ++i)
+ for(unsigned j=0; j<N; ++j)
+ m(i, j) = v[j][i];
+}
+
+template<typename T, unsigned M, unsigned N>
+inline Matrix<T, M, N> Matrix<T, M, N>::from_rows(const Vector<T, N> *v)
+{
+ Matrix<T, M, N> m;
+ for(unsigned i=0; i<M; ++i)
+ for(unsigned j=0; j<N; ++j)
+ m(i, j) = v[i][j];
+}
+
+template<typename T, unsigned M, unsigned N>
+inline T &Matrix<T, M, N>::element(unsigned i, unsigned j)