A vector is a list of elements. Elements should be separated by comma or space for row vector and semicolon for column vector.
For example:
>> B = [5 6 7]
B =
5 6 7

>> b= [23; 34; 12]
b =
23
34
12

A matrix is a rectangular array of numbers. Row and column vectors are also examples of matrices.
For example:
>> A = [1 3 5 6; 7 -3 1 8; 5 1 -1 9]
A =
1 3 5 6
7 -3 1 8
5 1 -1 9

MATLAB has many built-in functions. The built-in function zeros
can be used to create an all-zero array of any desired size.
For example:
>> a = zeros(2)
a =
0 0
0 0

>> b = zeros(2,3)
b =
0 0 0
0 0 0

eye function can be used to generate arrays containing identity matrices, in which all on-diagonal elements are one, while all off-diagonal elements are zero.
For example:
>> eye(3)
ans =
1 0 0
0 1 0
0 0 1