int matrix[3][3] = {{1,2,3}, {4,5,6}, {7,8,9}};
#includeIn example 1, a plain C++ array is used to define a 3x3 matrix with integer values. In example 2, the Eigen library is used to define a 3x3 matrix with double precision values. The size of the matrices is explicitly defined in both examples as 3x3.Eigen::Matrix3d matrix; matrix << 1, 2, 3, 4, 5, 6, 7, 8, 9;