Determine the F and D matrices for the Octet state.  First start with an 8x8 matrix:

table = Table[0,{8},{8}];

Make the isospin raising operator.  Note, In this table, we are requiring the raising operator to conserve isospin.  I.e. the eighth entry does not contribute to the third entry.

tp=table;

tp[[1,2]]=1;
tp[[3,4]]=Sqrt[2];
tp[[4,5]]=Sqrt[2];
tp[[6,7]]=1;

tp//MatrixForm

And the lowering operator, T_x, and T_y:

tm=Transpose[tp];

(tx=(tp+tm)/2)//MatrixForm

(ty=-I (tp-tm)/2)//MatrixForm

Define the commutator and anticommutator:

commutator[a_,b_]=a.b-b.a

anticommutator[a_, b_]  =  a . b  +  b . a

Get t_z from the anticommutation relations:

(tz  =  -I commutator[tx, ty]) // MatrixForm

Check total isospin:

tx.tx+ty.ty+tz.tz//MatrixForm

Now start the "U-spin" table.  Because we chose the isospin operator above not to mix I-spin states, the U-spin and V-spin operators must mix those states to maintain orthogonality.  The correct coefficients are (see Gasiorowicz):

up=table;

up[[1,3]]=-1;
up[[4,6]]=1/Sqrt[2];
up[[2,4]]=-1/Sqrt[2];
up[[2,8]]=Sqrt[3/2];
up[[8,6]]=-Sqrt[3/2];
up[[5,7]]=1;

up//MatrixForm

um = Transpose[up];
ux = (up + um)/2;
uy = (up - um)/2/I;

u3=1/2(up.um-um.up);

u3//MatrixForm

Simplify[ux.ux+uy.uy+u3.u3//MatrixForm]

Now calculate the hypercharge:

Y=2/3(2 u3+tz);

Y//MatrixForm

f8=Y*Sqrt[3]/2;

Get the V-spin raising operator from the commutator relationship:

commutator[tp, up] // MatrixForm

MatrixForm[tp]

commutator[tp, tz] // MatrixForm

MatrixForm[up]

(vp = Simplify[commutator[tp, up]]) // MatrixForm

vm=Transpose[vp];
v3=((vp.vm)-(vm.vp))/2;
vx=(vp+vm)/2;
vy=-I*(vp-vm)/2;
vx.vx+vy.vy+v3.v3//MatrixForm

vx//MatrixForm

vy//MatrixForm

Define the F matrices:

f1 = tx;
f2 = ty;
f3 = tz;
f4 = vx;
f5 = vy;
f6 = ux;
f7 = uy;

Check some commutators:

commutator[f4,f5]-I f3/2-I Sqrt[3]/2 f8//MatrixForm

commutator[f1,f4]-I/2 f7//MatrixForm

commutator[f1,f5]+I/2 f6//MatrixForm

flist={f1,f2,f3,f4,f5,f6,f7,f8};

F[i_] = flist[[i]];

Define the structure functions forthe commutators:

fftable[i_, j_, k_] = 0

\(allff[i_, j_, k_, a_] := 
      Module[{}, fftable[i, j, k] = a; 
		fftable[j, i, k] = \(-a\); \ 
        fftable[j, k, i] = a; fftable[k, j, i] = \(-a\); 
        fftable[k, i, j] = a; \ fftable[i, k, j] = \(-a\);]\)

allff[1, 2, 3, 1]

allff[1, 4, 7, 1/2]

allff[1, 5, 6, -1/2]

allff[2, 4, 6, 1/2]

allff[2, 5, 7, 1/2]

allff[3, 4, 5, 1/2]

allff[3, 6, 7, -1/2]

allff[4, 5, 8, Sqrt[3]/2]

allff[6, 7, 8, Sqrt[3]/2]

Check that the commutators are right (table will give a 1 if commutator is incorrect):

Table[
        If[commutator[F[i], F[j]] - 
              I Sum[fftable[i, j, k] F[k], {k, 1, 8}] != 
            Table[0, {8}, {8}], 1, 0], {i, 1, 8}, {j, 1, 8}] // 
      TableForm

Define the d structure constants:

ddtable[i_,j_,k_] = 0

alldd[i_,j_,k_,a_] := Module[{},ddtable[i,j,k]=a;

	ddtable[j,i,k]=a; ddtable[j,k,i]=a; ddtable[k,j,i]=a;

	ddtable[k,i,j]=a;ddtable[i,k,j]=a;]

alldd[1,1,8,1/Sqrt[3]]

alldd[1,4,6,1/2]

alldd[1,5,7,1/2]

alldd[2,2,8,1/Sqrt[3]]

alldd[2,4,7,-1/2]

alldd[2,5,6, 1/2]

alldd[3,3,8,1/Sqrt[3]]

alldd[3,4,4,1/2]

alldd[3,5,5,1/2]

alldd[3,6,6,-1/2]

alldd[3,7,7,-1/2]

alldd[4,4,8, -1/2/Sqrt[3]]

alldd[5,5,8, -1/2/Sqrt[3]]

alldd[6,6,8, -1/2/Sqrt[3]]

alldd[7,7,8, -1/2/Sqrt[3]]

alldd[8,8,8, -1/Sqrt[3]]

d[i_] := 2/3 Sum[ddtable[i,j,k]F[j].F[k],

	{j,1,8},{k,1,8}]

d[3]//MatrixForm

F[3]//MatrixForm

d[8]//MatrixForm

F[8]//MatrixForm

d[1]//MatrixForm

d[2]//MatrixForm

(diup = d[1] + I d[2]) // MatrixForm

(didown = d[1] -  I d[2]) // MatrixForm

(diup . didown  -  didown . diup)/2 // MatrixForm

Check commutation relationships with F matrices (again, a 1 in the table indicates a failed commutation relationship):

\(\(\(
\)\(Table[
        If[commutator[d[i], F[j]] - 
              I\ Sum[fftable[i, j, k]\ d[k], {k, 1, 8}] != 
            Table[0, {8}, {8}], 1, 0], {i, 1, 8}, {j, 1, 8}] // 
      TableForm\)\)\)