reserve D for non empty set,
  i,j,k,l for Nat,
  n for Nat,
  x for set,
  a,b,c,r,r1,r2 for Real,
  p,q for FinSequence of REAL,
  MR,MR1 for Matrix of REAL;

theorem Th22:
  for p being non empty FinSequence of REAL for q being
  FinSequence of REAL for M being Matrix of REAL holds M = (ColVec2Mx p) * (
LineVec2Mx q) iff (len M = len p & width M = len q & for i st i in dom M holds
  Line(M,i) = p.i * q)
proof
  let p be non empty FinSequence of REAL, q be FinSequence of REAL, M be
  Matrix of REAL;
  set M1 = ColVec2Mx p;
  set M2 = LineVec2Mx q;
  hereby
    assume
A1: M = M1 * M2;
    hence len M = len p & width M = len q by Th21;
    thus for i st i in dom M holds Line(M,i) = p.i * q
    proof
      let i;
      assume i in dom M;
      then
A2:   i in Seg len M by FINSEQ_1:def 3;
A3:   for j be Nat st j in dom Line(M,i) holds (Line(M,i)).j = (p.i * q).j
      proof
        let j be Nat;
        assume j in dom Line(M,i);
        then j in Seg len Line(M,i) by FINSEQ_1:def 3;
        then
A4:     j in Seg width M by MATRIX_0:def 7;
        then
A5:     [i,j] in Indices M by A2,MATRPROB:12;
        thus (Line(M,i)).j = M*(i,j) by A4,MATRIX_0:def 7
          .= p.i * q.j by A1,A5,Th21
          .= (p.i * q).j by RVSUM_1:44;
      end;
      dom Line(M,i) = Seg len Line(M,i) by FINSEQ_1:def 3
        .= Seg width M by MATRIX_0:def 7
        .= Seg len q by A1,Th21
        .= dom q by FINSEQ_1:def 3
        .= dom(p.i * q) by VALUED_1:def 5;
      hence thesis by A3,FINSEQ_1:13;
    end;
  end;
  assume that
A6: len M = len p and
A7: width M = len q and
A8: for i st i in dom M holds Line(M,i) = p.i * q;
  for i,j st [i,j] in Indices M holds M*(i,j) = p.i * q.j
  proof
    let i,j such that
A9: [i,j] in Indices M;
A10: i in dom M by A9,MATRPROB:13;
    j in Seg width M by A9,MATRPROB:12;
    hence M*(i,j) = (Line(M,i)).j by MATRIX_0:def 7
      .= (p.i * q).j by A8,A10
      .= p.i * q.j by RVSUM_1:44;
  end;
  hence thesis by A6,A7,Th21;
end;
