{
  "templateId": "matrix-vec",
  "title": "행렬·벡터 AST 패턴 (h5 기하)",
  "gradeRange": ["h5"],
  "errorPatterns": [
    {
      "stepId": "matrix-multiply",
      "label": "행렬 곱셈 (행×열 내적)",
      "description": "A_{ij} = Σ a_{ik}·b_{kj}",
      "exampleInput":  "[[1,2],[3,4]] × [[5,0],[1,2]]",
      "expectedOutput": "[[7,4],[19,8]]",
      "canonicalForm":  "[[7,4],[19,8]]",
      "errorTag": "MC_MATRIX_MUL_ERROR",
      "wrongExamples": ["[[5,0],[3,8]]", "[[5,2],[15,8]]"],
      "tokenPattern": ["[","[","num",",","num","]",",","[","num",",","num","]","]","*","[","..."]
    },
    {
      "stepId": "vector-dot",
      "label": "벡터 내적 (dot product)",
      "description": "a·b = |a||b|cosθ = a₁b₁+a₂b₂",
      "exampleInput":  "a=(3,4), b=(1,0) → a·b",
      "expectedOutput": "= 3×1 + 4×0 = 3",
      "canonicalForm":  "3",
      "errorTag": "MC_DOT_PRODUCT_ERROR",
      "wrongExamples": ["= 3+4=7", "= |a||b|=5"],
      "tokenPattern": ["a","·","b","=","a1","*","b1","+","a2","*","b2"]
    },
    {
      "stepId": "vector-cross",
      "label": "벡터 크기 |a| 계산",
      "description": "|a| = √(a₁²+a₂²) (2D), √(a₁²+a₂²+a₃²) (3D)",
      "exampleInput":  "a=(3,4)",
      "expectedOutput": "|a| = √(9+16) = √25 = 5",
      "canonicalForm":  "5",
      "errorTag": "MC_VECTOR_MAGNITUDE_ERROR",
      "wrongExamples": ["|a| = 3+4=7", "|a| = √7"],
      "tokenPattern": ["|","a","|","=","sqrt","(","a1","^2","+","a2","^2",")"]
    },
    {
      "stepId": "eigenvalue",
      "label": "행렬 판별식 (det) 계산",
      "description": "det(A) = ad - bc (2×2 행렬)",
      "exampleInput":  "A=[[a,b],[c,d]] → det(A)",
      "expectedOutput": "= ad - bc",
      "canonicalForm":  "ad-bc",
      "errorTag": "MC_DETERMINANT_ERROR",
      "wrongExamples": ["= ab-cd", "= ad+bc"],
      "tokenPattern": ["det","A","=","a","*","d","-","b","*","c"]
    },
    {
      "stepId": "vector-projection",
      "label": "벡터 정사영 (projection)",
      "description": "proj_b(a) = (a·b/|b|²)·b",
      "exampleInput":  "a=(2,1), b=(1,0)",
      "expectedOutput": "proj_b(a) = (2/1)·(1,0) = (2,0)",
      "canonicalForm":  "(2,0)",
      "errorTag": "MC_PROJECTION_ERROR",
      "wrongExamples": ["(1,0)", "(2,1)"],
      "tokenPattern": ["proj","b","(","a",")",  "=","(","a","·","b","/","|","b","|","^2",")",  "·","b"]
    }
  ],
  "difficultyWeights": { "×": 2, "det": 3, "proj": 3, "cross": 3, "eigen": 4 }
}
