diff --git a/matrix.c b/matrix.c
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..28db126711fbfa4f66b6de455f23be8bbc83c55b 100644
--- a/matrix.c
+++ b/matrix.c
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "matrix.h"
+
+
+error_code matrix_alloc(matrix *mat, int32_t m, int32_t n){
+    mat->data = malloc((mat->m * mat->n) * sizeof(int32_t));
+    if (mat->data == NULL)
+    {
+        return ERR;
+    }
+    else
+    {
+        for (size_t i = 0; i < mat->m; i++)
+        {
+            for (size_t j = 0; j < mat->n; j++)
+            {
+                mat->data[i][j] = 0;
+            }  
+        }
+    }
+    return OK;
+}
+
+
+
+
+
+
+int main(){
+    return 0;
+}
\ No newline at end of file