{
  "index": "1999-B-5",
  "type": "ALG",
  "tag": [
    "ALG",
    "NT",
    "ANA"
  ],
  "difficulty": "",
  "question": "For an integer $n\\geq 3$, let $\\theta=2\\pi/n$.  Evaluate the determinant of the\n$n\\times n$ matrix $I+A$, where $I$ is the $n\\times n$ identity matrix and\n$A=(a_{jk})$ has entries $a_{jk}=\\cos(j\\theta+k\\theta)$ for all $j,k$.",
  "solution": "First solution:\nWe claim that the eigenvalues of $A$ are $0$ with multiplicity $n-2$,\nand $n/2$ and $-n/2$, each with multiplicity $1$.  To prove this claim,\ndefine vectors $v^{(m)}$, $0\\leq m\\leq n-1$, componentwise by\n$(v^{(m)})_k = e^{ikm\\theta}$, and note that the $v^{(m)}$ form a basis\nfor $\\CC^n$.  (If we arrange the $v^{(m)}$ into an $n\\times n$ matrix,\nthen the determinant of this matrix is a Vandermonde product which is\nnonzero.)  Now note that\n\\begin{align*}\n(Av^{(m)})_j &= \\sum_{k=1}^n \\cos(j\\theta+k\\theta) e^{ikm\\theta} \\\\\n&= \\frac{e^{ij\\theta}}{2} \\sum_{k=1}^n e^{ik(m+1)\\theta}\n+ \\frac{e^{-ij\\theta}}{2} \\sum_{k=1}^n e^{ik(m-1)\\theta}.\n\\end{align*}\nSince $\\sum_{k=1}^n e^{ik\\ell\\theta} = 0$ for integer $\\ell$ unless\n$n\\,|\\,\\ell$, we conclude that $Av^{(m)}=0$ for $m=0$ or for\n$2 \\leq m \\leq n-1$.  In addition, we find that $(Av^{(1)})_j =\n\\frac{n}{2} e^{-ij\\theta} = \\frac{n}{2}(v^{(n-1)})_j$ and $(Av^{(n-1)})_j =\n\\frac{n}{2} e^{ij\\theta} = \\frac{n}{2}(v^{(1)})_j$, so that\n$A(v^{(1)} \\pm v^{(n-1)}) = \\pm \\frac{n}{2} (v^{(1)} \\pm v^{(n-1)})$.\nThus $\\{v^{(0)},v^{(2)},v^{(3)},\\ldots,v^{(n-2)},\nv^{(1)}+v^{(n-1)},v^{(1)}-v^{(n-1)}\\}$ is a basis for $\\CC^n$ of\neigenvectors of $A$ with the claimed eigenvalues.\n\nFinally, the determinant of $I+A$ is the product of $(1+\\lambda)$\nover all eigenvalues $\\lambda$ of $A$; in this case,\n$\\det (I+A) = (1+n/2)(1-n/2) = 1-n^2/4$.\n\nSecond solution (by Mohamed Omar): Set $x = e^{i \\theta}$ and write\n\\[\nA = \\frac{1}{2} u^T u + \\frac{1}{2} v^T v = \\frac{1}{2} \\begin{pmatrix} u^T& v^T \\end{pmatrix}\n\\begin{pmatrix} u \\\\ v \\end{pmatrix}\n\\]\nfor\n\\[\nu = \\begin{pmatrix} x & x^2 & \\cdots & x^n \\end{pmatrix},\nv = \\begin{pmatrix} x^{-1} & x^{-2} & \\cdots & x^n \\end{pmatrix}.\n\\]\nWe now use the fact that for $R$ an $n \\times m$ matrix and $S$ an $m \\times n$ matrix,\n\\[\n\\det (I_n + RS) = \\det(I_m + SR).\n\\]\nThis yields\n\\begin{align*}\n&\\det(I_N + A) \\\\\n&\\quad = \\det \\left( I_n + \\frac{1}{2} \\begin{pmatrix} u^T & v^T \\end{pmatrix}\n\\begin{pmatrix} u \\\\ v \\end{pmatrix} \\right) \\\\\n&\\quad = \\det \\left( I_2 + \\frac{1}{2} \\begin{pmatrix} u \\\\ v \\end{pmatrix}\\begin{pmatrix} u^T & v^T \\end{pmatrix}\n \\right) \\\\\n &\\quad = \\frac{1}{4} \\det \\begin{pmatrix} 2 + u u^T & uv^T \\\\\n vu^T & 2 + vv^T \\end{pmatrix} \\\\\n &\\quad = \\frac{1}{4} \\det \\begin{pmatrix} 2 + (x^2 + \\cdots + x^{2n}) & n \\\\\n n & 2 + (x^{-2} + \\cdots + x^{-2n}) \\end{pmatrix} \\\\\n  &\\quad = \\frac{1}{4} \\det \\begin{pmatrix} 2 & n \\\\\n n & 2 \\end{pmatrix} = 1 - \\frac{n^2}{4}.\n\\end{align*}",
  "vars": [
    "j",
    "k",
    "m",
    "\\\\ell",
    "x",
    "u",
    "v",
    "R",
    "S"
  ],
  "params": [
    "n",
    "\\\\theta",
    "I",
    "A",
    "a_jk",
    "I_n",
    "I_m",
    "I_N",
    "I_2"
  ],
  "sci_consts": [
    "e",
    "i"
  ],
  "variants": {
    "descriptive_long": {
      "map": {
        "j": "indexj",
        "k": "indexk",
        "m": "indexm",
        "\\ell": "indexell",
        "x": "variablex",
        "u": "vectoru",
        "v": "vectorv",
        "R": "matrixr",
        "S": "matrixs",
        "n": "paramn",
        "\\theta": "angtheta",
        "I": "identmat",
        "A": "matrixa",
        "a_jk": "entryajk",
        "I_n": "identn",
        "I_m": "identm",
        "I_N": "identbig",
        "I_2": "identtwo"
      },
      "question": "For an integer $paramn\\geq 3$, let $angtheta=2\\pi/paramn$.  Evaluate the determinant of the\n$paramn\\times paramn$ matrix $identmat+matrixa$, where $identmat$ is the $paramn\\times paramn$ identity matrix and\n$matrixa=(entryajk)$ has entries $entryajk=\\cos(indexjangtheta+indexkangtheta)$ for all $indexj,indexk$.",
      "solution": "First solution:\nWe claim that the eigenvalues of $matrixa$ are $0$ with multiplicity $paramn-2$,\nand $paramn/2$ and $-paramn/2$, each with multiplicity $1$.  To prove this claim,\ndefine vectors $vectorv^{(indexm)}$, $0\\leq indexm\\leq paramn-1$, componentwise by\n$(vectorv^{(indexm)})_{indexk} = e^{i indexk indexm angtheta}$, and note that the $vectorv^{(indexm)}$ form a basis\nfor $\\CC^{paramn}$.  (If we arrange the $vectorv^{(indexm)}$ into an $paramn\\times paramn$ matrix,\nthen the determinant of this matrix is a Vandermonde product which is\nnonzero.)  Now note that\n\\begin{align*}\n(matrixa\\,vectorv^{(indexm)})_{indexj} &= \\sum_{indexk=1}^{paramn} \\cos(indexjangtheta+indexkangtheta) e^{i indexk indexm angtheta} \\\\\n&= \\frac{e^{i indexjangtheta}}{2} \\sum_{indexk=1}^{paramn} e^{i indexk(indexm+1) angtheta}\n+ \\frac{e^{-i indexjangtheta}}{2} \\sum_{indexk=1}^{paramn} e^{i indexk(indexm-1) angtheta}.\n\\end{align*}\nSince $\\sum_{indexk=1}^{paramn} e^{i indexk indexell angtheta} = 0$ for integer $indexell$ unless\n$paramn\\,|\\,indexell$, we conclude that $matrixa\\,vectorv^{(indexm)}=0$ for $indexm=0$ or for\n$2 \\leq indexm \\leq paramn-1$.  In addition, we find that $(matrixa\\,vectorv^{(1)})_{indexj} =\n\\frac{paramn}{2} e^{-i indexj angtheta} = \\frac{paramn}{2}(vectorv^{(paramn-1)})_{indexj}$ and $(matrixa\\,vectorv^{(paramn-1)})_{indexj} =\n\\frac{paramn}{2} e^{i indexj angtheta} = \\frac{paramn}{2}(vectorv^{(1)})_{indexj}$, so that\n$matrixa(vectorv^{(1)} \\pm vectorv^{(paramn-1)}) = \\pm \\frac{paramn}{2} (vectorv^{(1)} \\pm vectorv^{(paramn-1)})$.\nThus $\\{vectorv^{(0)},vectorv^{(2)},vectorv^{(3)},\\ldots,vectorv^{(paramn-2)},\nvectorv^{(1)}+vectorv^{(paramn-1)},vectorv^{(1)}-vectorv^{(paramn-1)}\\}$ is a basis for $\\CC^{paramn}$ of\neigenvectors of $matrixa$ with the claimed eigenvalues.\n\nFinally, the determinant of $identmat+matrixa$ is the product of $(1+\\lambda)$\nover all eigenvalues $\\lambda$ of $matrixa$; in this case,\n$\\det (identmat+matrixa) = (1+paramn/2)(1-paramn/2) = 1-paramn^2/4$.\n\nSecond solution (by Mohamed Omar): Set $variablex = e^{i angtheta}$ and write\n\\[\nmatrixa = \\frac{1}{2} vectoru^T vectoru + \\frac{1}{2} vectorv^T vectorv = \\frac{1}{2} \\begin{pmatrix} vectoru^T& vectorv^T \\end{pmatrix}\n\\begin{pmatrix} vectoru \\\\ vectorv \\end{pmatrix}\n\\]\nfor\n\\[\nvectoru = \\begin{pmatrix} variablex & variablex^2 & \\cdots & variablex^{paramn} \\end{pmatrix},\nvectorv = \\begin{pmatrix} variablex^{-1} & variablex^{-2} & \\cdots & variablex^{paramn} \\end{pmatrix}.\n\\]\nWe now use the fact that for matrixr an $paramn \\times indexm$ matrix and matrixs an $indexm \\times paramn$ matrix,\n\\[\n\\det (identn + matrixr matrixs) = \\det(identm + matrixs matrixr).\n\\]\nThis yields\n\\begin{align*}\n&\\det(identbig + matrixa) \\\\\n&\\quad = \\det \\left( identn + \\frac{1}{2} \\begin{pmatrix} vectoru^T & vectorv^T \\end{pmatrix}\n\\begin{pmatrix} vectoru \\\\ vectorv \\end{pmatrix} \\right) \\\\\n&\\quad = \\det \\left( identtwo + \\frac{1}{2} \\begin{pmatrix} vectoru \\\\ vectorv \\end{pmatrix}\\begin{pmatrix} vectoru^T & vectorv^T \\end{pmatrix}\n \\right) \\\\\n &\\quad = \\frac{1}{4} \\det \\begin{pmatrix} 2 + vectoru\\,vectoru^T & vectoru vectorv^T \\\\\n vectorv vectoru^T & 2 + vectorv vectorv^T \\end{pmatrix} \\\\\n &\\quad = \\frac{1}{4} \\det \\begin{pmatrix} 2 + (variablex^2 + \\cdots + variablex^{2 paramn}) & paramn \\\\\n paramn & 2 + (variablex^{-2} + \\cdots + variablex^{-2 paramn}) \\end{pmatrix} \\\\\n  &\\quad = \\frac{1}{4} \\det \\begin{pmatrix} 2 & paramn \\\\\n paramn & 2 \\end{pmatrix} = 1 - \\frac{paramn^2}{4}.\n\\end{align*}"
    },
    "descriptive_long_confusing": {
      "map": {
        "j": "pineapple",
        "k": "raspberry",
        "m": "watermelon",
        "\\ell": "blackberry",
        "x": "blueberry",
        "u": "strawberry",
        "v": "cranberry",
        "R": "pomegranate",
        "S": "dragonfruit",
        "n": "caterpillar",
        "\\theta": "platypus",
        "I": "hippopotamus",
        "A": "orangutan",
        "a_jk": "koalabear",
        "I_n": "chameleon",
        "I_m": "aardvark",
        "I_N": "porcupine",
        "I_2": "armadillo"
      },
      "question": "For an integer $caterpillar\\geq 3$, let $platypus=2\\pi/caterpillar$.  Evaluate the determinant of the\n$caterpillar\\times caterpillar$ matrix $hippopotamus+orangutan$, where $hippopotamus$ is the $caterpillar\\times caterpillar$ identity matrix and\n$orangutan=(koalabear)$ has entries $koalabear=\\cos(pineapple platypus+raspberry platypus)$ for all $pineapple,raspberry$.",
      "solution": "First solution:\nWe claim that the eigenvalues of $orangutan$ are $0$ with multiplicity $caterpillar-2$,\nand $caterpillar/2$ and $-caterpillar/2$, each with multiplicity $1$.  To prove this claim,\ndefine vectors $cranberry^{(watermelon)}$, $0\\leq watermelon\\leq caterpillar-1$, componentwise by\n$(cranberry^{(watermelon)})_{raspberry} = e^{i raspberry watermelon platypus}$, and note that the $cranberry^{(watermelon)}$ form a basis\nfor $\\CC^{caterpillar}$.  (If we arrange the $cranberry^{(watermelon)}$ into an $caterpillar\\times caterpillar$ matrix,\nthen the determinant of this matrix is a Vandermonde product which is\nnonzero.)  Now note that\n\\begin{align*}\n(orangutan cranberry^{(watermelon)})_{pineapple} &= \\sum_{raspberry=1}^{caterpillar} \\cos(pineapple platypus+raspberry platypus) e^{i raspberry watermelon platypus} \\\\\n&= \\frac{e^{i pineapple platypus}}{2} \\sum_{raspberry=1}^{caterpillar} e^{i raspberry (watermelon+1) platypus}\n+ \\frac{e^{-i pineapple platypus}}{2} \\sum_{raspberry=1}^{caterpillar} e^{i raspberry (watermelon-1) platypus}.\n\\end{align*}\nSince $\\sum_{raspberry=1}^{caterpillar} e^{i raspberry blackberry platypus} = 0$ for integer $blackberry$ unless\n$caterpillar\\,|\\,blackberry$, we conclude that $orangutan cranberry^{(watermelon)}=0$ for $watermelon=0$ or for\n$2 \\leq watermelon \\leq caterpillar-1$.  In addition, we find that $(orangutan cranberry^{(1)})_{pineapple} =\n\\frac{caterpillar}{2} e^{-i pineapple platypus} = \\frac{caterpillar}{2}(cranberry^{(caterpillar-1)})_{pineapple}$ and $(orangutan cranberry^{(caterpillar-1)})_{pineapple} =\n\\frac{caterpillar}{2} e^{i pineapple platypus} = \\frac{caterpillar}{2}(cranberry^{(1)})_{pineapple}$, so that\n$orangutan(cranberry^{(1)} \\pm cranberry^{(caterpillar-1)}) = \\pm \\frac{caterpillar}{2} (cranberry^{(1)} \\pm cranberry^{(caterpillar-1)})$.\nThus $\\{cranberry^{(0)},cranberry^{(2)},cranberry^{(3)},\\ldots,cranberry^{(caterpillar-2)},\ncranberry^{(1)}+cranberry^{(caterpillar-1)},cranberry^{(1)}-cranberry^{(caterpillar-1)}\\}$ is a basis for $\\CC^{caterpillar}$ of\neigenvectors of $orangutan$ with the claimed eigenvalues.\n\nFinally, the determinant of $hippopotamus+orangutan$ is the product of $(1+\\lambda)$\nover all eigenvalues $\\lambda$ of $orangutan$; in this case,\n$\\det (hippopotamus+orangutan) = (1+caterpillar/2)(1-caterpillar/2) = 1-caterpillar^2/4$.\n\nSecond solution (by Mohamed Omar): Set $blueberry = e^{i platypus}$ and write\n\\[\norangutan = \\frac{1}{2} strawberry^T strawberry + \\frac{1}{2} cranberry^T cranberry = \\frac{1}{2} \\begin{pmatrix} strawberry^T& cranberry^T \\end{pmatrix}\n\\begin{pmatrix} strawberry \\\\ cranberry \\end{pmatrix}\n\\]\nfor\n\\[\nstrawberry = \\begin{pmatrix} blueberry & blueberry^2 & \\cdots & blueberry^{caterpillar} \\end{pmatrix},\ncranberry = \\begin{pmatrix} blueberry^{-1} & blueberry^{-2} & \\cdots & blueberry^{caterpillar} \\end{pmatrix}.\n\\]\nWe now use the fact that for $pomegranate$ an $caterpillar \\times watermelon$ matrix and $dragonfruit$ an $watermelon \\times caterpillar$ matrix,\n\\[\n\\det (chameleon + pomegranate dragonfruit) = \\det(aardvark + dragonfruit pomegranate).\n\\]\nThis yields\n\\begin{align*}\n&\\det(porcupine + orangutan) \\\\\n&\\quad = \\det \\left( chameleon + \\frac{1}{2} \\begin{pmatrix} strawberry^T & cranberry^T \\end{pmatrix}\n\\begin{pmatrix} strawberry \\\\ cranberry \\end{pmatrix} \\right) \\\\\n&\\quad = \\det \\left( armadillo + \\frac{1}{2} \\begin{pmatrix} strawberry \\\\ cranberry \\end{pmatrix}\\begin{pmatrix} strawberry^T & cranberry^T \\end{pmatrix}\n \\right) \\\\\n &\\quad = \\frac{1}{4} \\det \\begin{pmatrix} 2 + strawberry strawberry^T & strawberry cranberry^T \\\\\n cranberry strawberry^T & 2 + cranberry cranberry^T \\end{pmatrix} \\\\\n &\\quad = \\frac{1}{4} \\det \\begin{pmatrix} 2 + (blueberry^2 + \\cdots + blueberry^{2 caterpillar}) & caterpillar \\\\\n caterpillar & 2 + (blueberry^{-2} + \\cdots + blueberry^{-2 caterpillar}) \\end{pmatrix} \\\\\n  &\\quad = \\frac{1}{4} \\det \\begin{pmatrix} 2 & caterpillar \\\\\n caterpillar & 2 \\end{pmatrix} = 1 - \\frac{caterpillar^2}{4}.\n\\end{align*}"
    },
    "descriptive_long_misleading": {
      "map": {
        "j": "maximalindex",
        "k": "initialindex",
        "m": "fractionalvalue",
        "\\\\ell": "straightsymbol",
        "x": "knownvalue",
        "u": "downvector",
        "v": "scalarsymbol",
        "R": "minormatrix",
        "S": "emptymatrix",
        "n": "fractional",
        "\\\\theta": "straightline",
        "I": "zeromatrix",
        "A": "voidmatrix",
        "a_jk": "blankentry",
        "I_n": "zeroblockn",
        "I_m": "zeroblockm",
        "I_N": "zeroblockbig",
        "I_2": "zeroblocktwo"
      },
      "question": "For an integer $fractional\\geq 3$, let $straightline = 2\\pi/fractional$.  Evaluate the determinant of the\n$fractional\\times fractional$ matrix $zeromatrix+voidmatrix$, where $zeromatrix$ is the $fractional\\times fractional$ identity matrix and\n$voidmatrix=(blankentry)$ has entries $blankentry=\\cos(maximalindex straightline+initialindex straightline)$ for all $maximalindex,initialindex$.",
      "solution": "First solution:\nWe claim that the eigenvalues of $voidmatrix$ are $0$ with multiplicity $fractional-2$,\nand $fractional/2$ and $-fractional/2$, each with multiplicity $1$.  To prove this claim,\ndefine vectors $scalarsymbol^{(fractionalvalue)}$, $0\\leq fractionalvalue\\leq fractional-1$, componentwise by\n$(scalarsymbol^{(fractionalvalue)})_{initialindex} = e^{i\\,initialindex\\,fractionalvalue\\,straightline}$, and note that the $scalarsymbol^{(fractionalvalue)}$ form a basis\nfor $\\CC^{fractional}$.  (If we arrange the $scalarsymbol^{(fractionalvalue)}$ into a $fractional\\times fractional$ matrix,\nthen the determinant of this matrix is a Vandermonde product which is\nnonzero.)  Now note that\n\\begin{align*}\n(voidmatrix\\,scalarsymbol^{(fractionalvalue)})_{maximalindex}\n&= \\sum_{initialindex=1}^{fractional} \\cos(maximalindex\\,straightline+initialindex\\,straightline)\\, e^{i\\,initialindex\\,fractionalvalue\\,straightline} \\\\\n&= \\frac{e^{i\\,maximalindex\\,straightline}}{2} \\sum_{initialindex=1}^{fractional} e^{i\\,initialindex\\,(fractionalvalue+1)\\,straightline}\n+ \\frac{e^{-i\\,maximalindex\\,straightline}}{2} \\sum_{initialindex=1}^{fractional} e^{i\\,initialindex\\,(fractionalvalue-1)\\,straightline}.\n\\end{align*}\nSince $\\sum_{initialindex=1}^{fractional} e^{i\\,initialindex\\,straightsymbol\\,straightline} = 0$ for integer $straightsymbol$ unless\n$fractional\\,|\\,straightsymbol$, we conclude that $voidmatrix\\,scalarsymbol^{(fractionalvalue)}=0$ for $fractionalvalue=0$ or for\n$2 \\leq fractionalvalue \\leq fractional-1$.  In addition, we find that $(voidmatrix\\,scalarsymbol^{(1)})_{maximalindex} =\n\\frac{fractional}{2}\\,e^{-i\\,maximalindex\\,straightline} = \\frac{fractional}{2}(scalarsymbol^{(fractional-1)})_{maximalindex}$ and\n$(voidmatrix\\,scalarsymbol^{(fractional-1)})_{maximalindex} =\n\\frac{fractional}{2} e^{i\\,maximalindex\\,straightline} = \\frac{fractional}{2}(scalarsymbol^{(1)})_{maximalindex}$, so that\n$voidmatrix(\\,scalarsymbol^{(1)} \\pm scalarsymbol^{(fractional-1)}) = \\pm \\frac{fractional}{2} (scalarsymbol^{(1)} \\pm scalarsymbol^{(fractional-1)})$.\nThus $\\{scalarsymbol^{(0)},scalarsymbol^{(2)},scalarsymbol^{(3)},\\ldots,scalarsymbol^{(fractional-2)},\nscalarsymbol^{(1)}+scalarsymbol^{(fractional-1)},scalarsymbol^{(1)}-scalarsymbol^{(fractional-1)}\\}$ is a basis for $\\CC^{fractional}$ of\neigenvectors of $voidmatrix$ with the claimed eigenvalues.\n\nFinally, the determinant of $zeromatrix+voidmatrix$ is the product of $(1+\\lambda)$\nover all eigenvalues $\\lambda$ of $voidmatrix$; in this case,\n$\\det (zeromatrix+voidmatrix) = (1+fractional/2)(1-fractional/2) = 1-fractional^2/4$.\n\nSecond solution (by Mohamed Omar): Set $knownvalue = e^{i\\,straightline}$ and write\n\\[\nvoidmatrix = \\frac{1}{2}\\, downvector^T downvector + \\frac{1}{2}\\, scalarsymbol^T scalarsymbol = \\frac{1}{2} \\begin{pmatrix} downvector^T& scalarsymbol^T \\end{pmatrix}\n\\begin{pmatrix} downvector \\\\ scalarsymbol \\end{pmatrix}\n\\]\nfor\n\\[\ndownvector = \\begin{pmatrix} knownvalue & knownvalue^2 & \\cdots & knownvalue^{fractional} \\end{pmatrix},\\qquad\nscalarsymbol = \\begin{pmatrix} knownvalue^{-1} & knownvalue^{-2} & \\cdots & knownvalue^{fractional} \\end{pmatrix}.\n\\]\nWe now use the fact that for $minormatrix$ an $fractional \\times m$ matrix and $emptymatrix$ an $m \\times fractional$ matrix,\n\\[\n\\det (zeroblockn + minormatrix\\,emptymatrix) = \\det(zeroblockm + emptymatrix\\,minormatrix).\n\\]\nThis yields\n\\begin{align*}\n&\\det(zeroblockbig + voidmatrix) \\\\\n&\\quad = \\det \\left( zeroblockn + \\frac{1}{2} \\begin{pmatrix} downvector^T & scalarsymbol^T \\end{pmatrix}\n\\begin{pmatrix} downvector \\\\ scalarsymbol \\end{pmatrix} \\right) \\\\\n&\\quad = \\det \\left( zeroblocktwo + \\frac{1}{2} \\begin{pmatrix} downvector \\\\ scalarsymbol \\end{pmatrix}\\begin{pmatrix} downvector^T & scalarsymbol^T \\end{pmatrix} \\right) \\\\\n&\\quad = \\frac{1}{4}\\, \\det \\begin{pmatrix} 2 + downvector\\,downvector^T & downvector\\,scalarsymbol^T \\\\\n scalarsymbol\\,downvector^T & 2 + scalarsymbol\\,scalarsymbol^T \\end{pmatrix} \\\\\n&\\quad = \\frac{1}{4}\\, \\det \\begin{pmatrix} 2 + (knownvalue^2 + \\cdots + knownvalue^{2fractional}) & fractional \\\\\n fractional & 2 + (knownvalue^{-2} + \\cdots + knownvalue^{-2fractional}) \\end{pmatrix} \\\\\n&\\quad = \\frac{1}{4}\\, \\det \\begin{pmatrix} 2 & fractional \\\\\n fractional & 2 \\end{pmatrix} = 1 - \\frac{fractional^2}{4}.\n\\end{align*}"
    },
    "garbled_string": {
      "map": {
        "j": "fmqpeivn",
        "k": "gxdorolb",
        "m": "ctajrsue",
        "\\ell": "bwkpzivh",
        "x": "ylqrnsad",
        "u": "zeghoktm",
        "v": "sxajdpru",
        "R": "hciwmtgz",
        "S": "opqlneda",
        "n": "tbevkszn",
        "\\theta": "rufgpkds",
        "I": "lnaoqwre",
        "A": "dzkhjvym",
        "a_jk": "mqodivlf",
        "I_n": "bztxufrq",
        "I_m": "gqsdnlyp",
        "I_N": "ywtroezs",
        "I_2": "pknvjsua"
      },
      "question": "For an integer $tbevkszn\\geq 3$, let $rufgpkds=2\\pi/tbevkszn$.  Evaluate the determinant of the\ntbevkszn\\times tbevkszn matrix $lnaoqwre+dzkhjvym$, where $lnaoqwre$ is the $tbevkszn\\times tbevkszn$ identity matrix and\ndzkhjvym=(mqodivlf) has entries $mqodivlf=\\cos(fmqpeivn rufgpkds+gxdorolb rufgpkds)$ for all $fmqpeivn,gxdorolb$.",
      "solution": "First solution:\nWe claim that the eigenvalues of $dzkhjvym$ are $0$ with multiplicity $tbevkszn-2$, and $tbevkszn/2$ and $-tbevkszn/2$, each with multiplicity $1$.  To prove this claim, define vectors $sxajdpru^{(ctajrsue)}$, $0\\leq ctajrsue\\leq tbevkszn-1$, componentwise by $(sxajdpru^{(ctajrsue)})_{gxdorolb}=e^{i gxdorolb ctajrsue rufgpkds}$, and note that the $sxajdpru^{(ctajrsue)}$ form a basis for $\\CC^{tbevkszn}$.  (If we arrange the $sxajdpru^{(ctajrsue)}$ into an $tbevkszn\\times tbevkszn$ matrix, then the determinant of this matrix is a Vandermonde product which is nonzero.)  Now note that\n\\begin{align*}\n(dzkhjvym\\,sxajdpru^{(ctajrsue)})_{fmqpeivn} &= \\sum_{gxdorolb=1}^{tbevkszn} \\cos(fmqpeivn rufgpkds+gxdorolb rufgpkds) e^{i gxdorolb ctajrsue rufgpkds} \\\\ &\\quad= \\frac{e^{i fmqpeivn rufgpkds}}{2} \\sum_{gxdorolb=1}^{tbevkszn} e^{i gxdorolb (ctajrsue+1) rufgpkds}+ \\frac{e^{-i fmqpeivn rufgpkds}}{2} \\sum_{gxdorolb=1}^{tbevkszn} e^{i gxdorolb (ctajrsue-1) rufgpkds}.\n\\end{align*}\nSince $\\sum_{gxdorolb=1}^{tbevkszn} e^{i gxdorolb bwkpzivh rufgpkds}=0$ for integer $bwkpzivh$ unless $tbevkszn\\,|\\,bwkpzivh$, we conclude that $dzkhjvym\\,sxajdpru^{(ctajrsue)}=0$ for $ctajrsue=0$ or for $2\\leq ctajrsue\\leq tbevkszn-1$.  In addition, we find that $(dzkhjvym\\,sxajdpru^{(1)})_{fmqpeivn}=\\frac{tbevkszn}{2}e^{-i fmqpeivn rufgpkds}=\\frac{tbevkszn}{2}(sxajdpru^{(tbevkszn-1)})_{fmqpeivn}$ and $(dzkhjvym\\,sxajdpru^{(tbevkszn-1)})_{fmqpeivn}=\\frac{tbevkszn}{2}e^{i fmqpeivn rufgpkds}=\\frac{tbevkszn}{2}(sxajdpru^{(1)})_{fmqpeivn}$, so that $dzkhjvym(sxajdpru^{(1)}\\pm sxajdpru^{(tbevkszn-1)})=\\pm\\frac{tbevkszn}{2}(sxajdpru^{(1)}\\pm sxajdpru^{(tbevkszn-1)})$.  Thus $\\{sxajdpru^{(0)},sxajdpru^{(2)},sxajdpru^{(3)},\\ldots,sxajdpru^{(tbevkszn-2)},sxajdpru^{(1)}+sxajdpru^{(tbevkszn-1)},sxajdpru^{(1)}-sxajdpru^{(tbevkszn-1)}\\}$ is a basis for $\\CC^{tbevkszn}$ of eigenvectors of $dzkhjvym$ with the claimed eigenvalues.\n\nFinally, the determinant of $lnaoqwre+dzkhjvym$ is the product of $(1+\\lambda)$ over all eigenvalues $\\lambda$ of $dzkhjvym$; in this case, $\\det(lnaoqwre+dzkhjvym)=(1+tbevkszn/2)(1-tbevkszn/2)=1-tbevkszn^2/4$.\n\nSecond solution (by Mohamed Omar): Set $ylqrnsad=e^{i rufgpkds}$ and write\n\\[\ndzkhjvym=\\frac{1}{2}zeghoktm^Tzeghoktm+\\frac{1}{2}sxajdpru^Tsxajdpru=\\frac{1}{2}\\begin{pmatrix}zeghoktm^T&sxajdpru^T\\end{pmatrix}\\begin{pmatrix}zeghoktm\\\\sxajdpru\\end{pmatrix}\n\\]\nfor\n\\[\nzeghoktm=\\begin{pmatrix}ylqrnsad&ylqrnsad^2&\\cdots&ylqrnsad^{tbevkszn}\\end{pmatrix},\\qquad sxajdpru=\\begin{pmatrix}ylqrnsad^{-1}&ylqrnsad^{-2}&\\cdots&ylqrnsad^{tbevkszn}\\end{pmatrix}.\n\\]\nWe now use the fact that for $hciwmtgz$ an $tbevkszn\\times ctajrsue$ matrix and $opqlneda$ an $ctajrsue\\times tbevkszn$ matrix,\n\\[\n\\det(bztxufrq+hciwmtg z opqlneda)=\\det(gqsdnlyp+opqlneda hciwmtg z).\n\\]\nThis yields\n\\begin{align*}\n&\\det(ywtroezs+dzkhjvym)\\\\\n&\\quad=\\det\\left(bztxufrq+\\frac{1}{2}\\begin{pmatrix}zeghoktm^T&sxajdpru^T\\end{pmatrix}\\begin{pmatrix}zeghoktm\\\\sxajdpru\\end{pmatrix}\\right)\\\\\n&\\quad=\\det\\left(pknvjsua+\\frac{1}{2}\\begin{pmatrix}zeghoktm\\\\sxajdpru\\end{pmatrix}\\begin{pmatrix}zeghoktm^T&sxajdpru^T\\end{pmatrix}\\right)\\\\\n&\\quad=\\frac{1}{4}\\det\\begin{pmatrix}2+zeghoktm\\,zeghoktm^T&zeghoktm sxajdpru^T\\\\sxajdpru zeghoktm^T&2+sxajdpru sxajdpru^T\\end{pmatrix}\\\\\n&\\quad=\\frac{1}{4}\\det\\begin{pmatrix}2+(ylqrnsad^2+\\cdots+ylqrnsad^{2 tbevkszn})&tbevkszn\\\\tbevkszn&2+(ylqrnsad^{-2}+\\cdots+ylqrnsad^{-2 tbevkszn})\\end{pmatrix}\\\\\n&\\quad=\\frac{1}{4}\\det\\begin{pmatrix}2&tbevkszn\\\\tbevkszn&2\\end{pmatrix}=1-\\frac{tbevkszn^2}{4}.\n\\end{align*}"
    },
    "kernel_variant": {
      "question": "Let n ≥ 5 be an integer and write φ(n) for Euler’s totient.  \nChoose an integer r with  \n\n 1 ≤ r ≤ min {⌊(n−1)/2⌋, φ(n)/2}.                                                (0)\n\n(It is well known that condition (0) guarantees the existence of at least r residue classes modulo n that are coprime to n and pairwise distinct up to sign.)  \nPick integers  \n\n k₁, … , k_r   (1 ≤ k_s ≤ n−1)  \n\nsuch that  \n\n gcd(k_s , n) = 1          (1a)  \n k_s ≠ ±k_t (mod n) whenever s ≠ t.  (1b)\n\nPut  \n\n θ_s := 2πk_s / n     (s = 1,…,r)                               (2)\n\nand for 1 ≤ j,ℓ ≤ n define the n×n real matrices  \n\n S^{(s)}_{jℓ} := sin( jθ_s + ℓθ_s ).                                (3)\n\nSet  \n\n B :=  ∑_{s=1}^{r}  S^{(s)}.                                        (4)\n\nCompute, in closed form, the determinant  \n\n det ((2r+1) I_n + B).                                              (5)\n\n(Here I_n denotes the n×n identity matrix and all trigonometric\nfunctions are taken in the usual real sense; no reduction modulo n is\nperformed inside the sine.)\n\n––––––––––––––––––––––––––––––––––––––––––",
      "solution": "Throughout “ᵀ” denotes ordinary transpose, never conjugate transpose.\n\nStep 1.  Rank-two factorisation of each S^{(s)}.  \nIntroduce the complex column vectors  \n\n u^{(s)} := (e^{iθ_s}, e^{2iθ_s}, …, e^{niθ_s})ᵀ,   \n v^{(s)} := (e^{−iθ_s}, e^{−2iθ_s}, …, e^{−niθ_s})ᵀ.               (6)\n\nBecause sin α = (e^{iα} − e^{−iα})/(2i), (3) rewrites as  \n\n S^{(s)} = (1/2i) [ u^{(s)} (u^{(s)})ᵀ − v^{(s)} (v^{(s)})ᵀ ].      (7)\n\nHence rank S^{(s)} ≤ 2 and therefore  \n\n rank B ≤ 2r.                                                       (8)\n\nStep 2.  Block orthogonality of the u’s and v’s.  \nFor s ≠ t,\n\n(u^{(s)})ᵀu^{(t)} = ∑_{j=1}^{n} e^{ij(k_s+k_t)2π/n} = 0,  \n(u^{(s)})ᵀv^{(t)} = ∑_{j=1}^{n} e^{ij(k_s−k_t)2π/n} = 0,            (9)\n\nbecause the common ratio is a non-trivial n-th root of unity (conditions\n(1a)–(1b)).  For each s one also has\n\n (u^{(s)})ᵀv^{(s)} = n.                                              (10)\n\nThus the 2r vectors  \n\n u^{(1)}, v^{(1)}, … , u^{(r)}, v^{(r)}                              (11)\n\nsplit into r mutually orthogonal two–dimensional blocks\n\n W_s := span {u^{(s)}, v^{(s)}} (s = 1,…,r).                       (12)\n\nThe Gram matrix of the family (11) is block-diagonal with 2×2 blocks\n\n [ 0 n ; n 0 ], whose determinant is −n².                           (13)\n\nConsequently the full Gram determinant equals (−1)^r n^{2r} ≠ 0; the\n2r vectors (11) are linearly independent.\n\nStep 3.  B-invariant real planes.  \nDefine\n\n p_s := u^{(s)} + v^{(s)},  q_s := i( u^{(s)} − v^{(s)} ).          (14)\n\nA short calculation using (7) gives\n\n S^{(s)}p_s = −(n/2) q_s,   S^{(s)}q_s = −(n/2) p_s.               (15)\n\nFor t ≠ s the orthogonality relations (9)–(10) imply\nS^{(t)}p_s = S^{(t)}q_s = 0, whence\n\n B p_s = −(n/2) q_s,  B q_s = −(n/2) p_s.                          (16)\n\nThus the real plane\n\n V_s := span {p_s, q_s}                                              (17)\n\nis B-invariant and, in the ordered basis (p_s, q_s),\n\n B|_{V_s} = [ 0 −n/2 ; −n/2 0 ],                                    (18)\n\nwhose eigenvalues are +n/2 and −n/2.  Because the planes V_1,…,V_r are\nmutually orthogonal, B already exhibits 2r non-zero eigenvalues.\n\nCombining this with (8) forces\n\n rank B = 2r and dim ker B = n−2r.                                  (19)\n\nHence the full spectrum of B is\n\n +n/2 (multiplicity r),  \n −n/2 (multiplicity r),  \n  0   (multiplicity n−2r).                                          (20)\n\nStep 4.  Determinant of (2r+1)I_n + B.  \nFor any matrix X, det(I+X) = ∏(1+λ_i), where λ_i range over the\neigenvalues of X.  Apply this with X = (2r)I_n + B; its eigenvalues are\n\n 2r + n/2 (repeated r times),  \n 2r − n/2 (repeated r times),  \n 2r        (repeated n−2r times).                                   (21)\n\nTherefore\n\ndet((2r+1)I_n + B)  \n  = (2r+1 + n/2)^{r} (2r+1 − n/2)^{r} (2r+1)^{\\,n−2r}.               (22)\n\nStep 5.  Closed form.  Factor the first two factors:\n\ndet((2r+1)I_n + B)  \n  = (2r+1)^{\\,n−2r} · [ (2r+1)² − n²/4 ]^{\\,r}.                    (23)\n\nFormula (23) holds for every integer n ≥ 5 and every r satisfying (0),\nprovided k₁,…,k_r meet conditions (1a)–(1b).\n\n––––––––––––––––––––––––––––––––––––––––––",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.767555",
        "was_fixed": false,
        "difficulty_analysis": "1. Additional variables and dimensions:  Instead of a single frequency k, the problem involves an arbitrary collection k₁,…,k_r, raising the effective rank from ≤2 to ≤2r and forcing the solver to manage a family of mutually orthogonal 2-dimensional invariant subspaces.\n2. Extra constraints:  The non-trivial congruence conditions k_s ≠ ± k_t (mod n) prevent overlaps of invariant subspaces and make the orthogonality argument subtle.\n3. Deeper theory:  The solution needs character sums over the cyclic group ℤ/nℤ, orthogonality of roots of unity, decomposition of B into rank-two blocks, and block-diagonalisation—a significant step beyond the single-rank computation in the original problem.\n4. Greater computational load:  One must track 2r eigenvectors, derive their interactions, and finally assemble the determinant, whereas the original required analysing only two non-zero eigenvalues.\n5. Broad generality:  The final formula holds simultaneously for all admissible r and n, not just for a fixed small parameter, adding an extra layer of abstraction.\n\nAll these features combine to make the enhanced kernel variant markedly more challenging than both the original problem and the current kernel variant."
      }
    },
    "original_kernel_variant": {
      "question": "Let n ≥ 5 be an integer and write φ(n) for Euler’s totient.  \nChoose an integer r with  \n\n 1 ≤ r ≤ min {⌊(n−1)/2⌋, φ(n)/2}.                                                (0)\n\n(It is well known that condition (0) guarantees the existence of at least r residue classes modulo n that are coprime to n and pairwise distinct up to sign.)  \nPick integers  \n\n k₁, … , k_r   (1 ≤ k_s ≤ n−1)  \n\nsuch that  \n\n gcd(k_s , n) = 1          (1a)  \n k_s ≠ ±k_t (mod n) whenever s ≠ t.  (1b)\n\nPut  \n\n θ_s := 2πk_s / n     (s = 1,…,r)                               (2)\n\nand for 1 ≤ j,ℓ ≤ n define the n×n real matrices  \n\n S^{(s)}_{jℓ} := sin( jθ_s + ℓθ_s ).                                (3)\n\nSet  \n\n B :=  ∑_{s=1}^{r}  S^{(s)}.                                        (4)\n\nCompute, in closed form, the determinant  \n\n det ((2r+1) I_n + B).                                              (5)\n\n(Here I_n denotes the n×n identity matrix and all trigonometric\nfunctions are taken in the usual real sense; no reduction modulo n is\nperformed inside the sine.)\n\n––––––––––––––––––––––––––––––––––––––––––",
      "solution": "Throughout “ᵀ” denotes ordinary transpose, never conjugate transpose.\n\nStep 1.  Rank-two factorisation of each S^{(s)}.  \nIntroduce the complex column vectors  \n\n u^{(s)} := (e^{iθ_s}, e^{2iθ_s}, …, e^{niθ_s})ᵀ,   \n v^{(s)} := (e^{−iθ_s}, e^{−2iθ_s}, …, e^{−niθ_s})ᵀ.               (6)\n\nBecause sin α = (e^{iα} − e^{−iα})/(2i), (3) rewrites as  \n\n S^{(s)} = (1/2i) [ u^{(s)} (u^{(s)})ᵀ − v^{(s)} (v^{(s)})ᵀ ].      (7)\n\nHence rank S^{(s)} ≤ 2 and therefore  \n\n rank B ≤ 2r.                                                       (8)\n\nStep 2.  Block orthogonality of the u’s and v’s.  \nFor s ≠ t,\n\n(u^{(s)})ᵀu^{(t)} = ∑_{j=1}^{n} e^{ij(k_s+k_t)2π/n} = 0,  \n(u^{(s)})ᵀv^{(t)} = ∑_{j=1}^{n} e^{ij(k_s−k_t)2π/n} = 0,            (9)\n\nbecause the common ratio is a non-trivial n-th root of unity (conditions\n(1a)–(1b)).  For each s one also has\n\n (u^{(s)})ᵀv^{(s)} = n.                                              (10)\n\nThus the 2r vectors  \n\n u^{(1)}, v^{(1)}, … , u^{(r)}, v^{(r)}                              (11)\n\nsplit into r mutually orthogonal two–dimensional blocks\n\n W_s := span {u^{(s)}, v^{(s)}} (s = 1,…,r).                       (12)\n\nThe Gram matrix of the family (11) is block-diagonal with 2×2 blocks\n\n [ 0 n ; n 0 ], whose determinant is −n².                           (13)\n\nConsequently the full Gram determinant equals (−1)^r n^{2r} ≠ 0; the\n2r vectors (11) are linearly independent.\n\nStep 3.  B-invariant real planes.  \nDefine\n\n p_s := u^{(s)} + v^{(s)},  q_s := i( u^{(s)} − v^{(s)} ).          (14)\n\nA short calculation using (7) gives\n\n S^{(s)}p_s = −(n/2) q_s,   S^{(s)}q_s = −(n/2) p_s.               (15)\n\nFor t ≠ s the orthogonality relations (9)–(10) imply\nS^{(t)}p_s = S^{(t)}q_s = 0, whence\n\n B p_s = −(n/2) q_s,  B q_s = −(n/2) p_s.                          (16)\n\nThus the real plane\n\n V_s := span {p_s, q_s}                                              (17)\n\nis B-invariant and, in the ordered basis (p_s, q_s),\n\n B|_{V_s} = [ 0 −n/2 ; −n/2 0 ],                                    (18)\n\nwhose eigenvalues are +n/2 and −n/2.  Because the planes V_1,…,V_r are\nmutually orthogonal, B already exhibits 2r non-zero eigenvalues.\n\nCombining this with (8) forces\n\n rank B = 2r and dim ker B = n−2r.                                  (19)\n\nHence the full spectrum of B is\n\n +n/2 (multiplicity r),  \n −n/2 (multiplicity r),  \n  0   (multiplicity n−2r).                                          (20)\n\nStep 4.  Determinant of (2r+1)I_n + B.  \nFor any matrix X, det(I+X) = ∏(1+λ_i), where λ_i range over the\neigenvalues of X.  Apply this with X = (2r)I_n + B; its eigenvalues are\n\n 2r + n/2 (repeated r times),  \n 2r − n/2 (repeated r times),  \n 2r        (repeated n−2r times).                                   (21)\n\nTherefore\n\ndet((2r+1)I_n + B)  \n  = (2r+1 + n/2)^{r} (2r+1 − n/2)^{r} (2r+1)^{\\,n−2r}.               (22)\n\nStep 5.  Closed form.  Factor the first two factors:\n\ndet((2r+1)I_n + B)  \n  = (2r+1)^{\\,n−2r} · [ (2r+1)² − n²/4 ]^{\\,r}.                    (23)\n\nFormula (23) holds for every integer n ≥ 5 and every r satisfying (0),\nprovided k₁,…,k_r meet conditions (1a)–(1b).\n\n––––––––––––––––––––––––––––––––––––––––––",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.588130",
        "was_fixed": false,
        "difficulty_analysis": "1. Additional variables and dimensions:  Instead of a single frequency k, the problem involves an arbitrary collection k₁,…,k_r, raising the effective rank from ≤2 to ≤2r and forcing the solver to manage a family of mutually orthogonal 2-dimensional invariant subspaces.\n2. Extra constraints:  The non-trivial congruence conditions k_s ≠ ± k_t (mod n) prevent overlaps of invariant subspaces and make the orthogonality argument subtle.\n3. Deeper theory:  The solution needs character sums over the cyclic group ℤ/nℤ, orthogonality of roots of unity, decomposition of B into rank-two blocks, and block-diagonalisation—a significant step beyond the single-rank computation in the original problem.\n4. Greater computational load:  One must track 2r eigenvectors, derive their interactions, and finally assemble the determinant, whereas the original required analysing only two non-zero eigenvalues.\n5. Broad generality:  The final formula holds simultaneously for all admissible r and n, not just for a fixed small parameter, adding an extra layer of abstraction.\n\nAll these features combine to make the enhanced kernel variant markedly more challenging than both the original problem and the current kernel variant."
      }
    }
  },
  "checked": true,
  "problem_type": "calculation"
}