
23 A.3d 689 (2011)
301 Conn. 708
STATE of Connecticut
v.
John TABONE.
No. 18581.
Supreme Court of Connecticut.
Argued April 28, 2011.
Decided July 26, 2011.
*690 Andrew S. Liskov, special public defender, for the appellant (defendant).
*691 Nancy L. Chupak, senior assistant state's attorney, with whom, on the brief, was John A. Connelly, former state's attorney, for the appellee (state).
ROGERS, C.J., and NORCOTT, PALMER, ZARELLA, EVELEIGH, HARPER and VERTEFEUILLE, Js.
EVELEIGH, J.
This case comes before the court for a third time following our second remand for resentencing. See State v. Tabone, 279 Conn. 527, 902 A.2d 1058 (2006) (Tabone I); State v. Tabone, 292 Conn. 417, 973 A.2d 74 (2009) (Tabone II). At the hearing for resentencing upon remand, the defendant moved to withdraw his prior pleas. The motion was denied by the trial court. The defendant now appeals[1] from the judgment of the trial court denying his motion to withdraw his pleas.[2] On appeal, the defendant claims that the trial court should have granted his motion pursuant to Practice Book §§ 39-26 and 39-27(2), as well as the due process protections under both the United States and Connecticut constitutions because this court in Tabone II determined that his plea agreement resulted in an unenforceable illegal sentence.[3] The state contends that the motion was beyond the scope of this court's remand and, therefore, the trial court lacked subject matter jurisdiction to consider the defendant's motion. We agree with the state and conclude that the defendant's motion should have been dismissed.
Some historical perspective is helpful to an understanding of the present matter. In Tabone I, supra, 279 Conn. at 529, 902 A.2d 1058, the defendant appealed from the judgment of the trial court denying his motion to correct an illegal sentence. He had previously pled guilty on November 2, 2000, to one count each of the crimes of sexual assault in the second degree in violation of General Statutes (Rev. to 1999) § 53a-71 (a)(4), sexual assault in the third degree in violation of General Statutes (Rev. to 1999) § 53a-72a (a)(1)(A), and risk of injury to a child in violation of General Statutes (Rev. to 1999) § 53-21(2). Id., at 530, 902 A.2d 1058. "The trial court sentenced the defendant as follows: (1) for the charge of sexual assault in the second degree, ten years imprisonment followed by ten years of special parole; (2) for the charge of sexual assault in the third degree, five years of imprisonment followed by five years of special parole; and (3) for the charge of risk of injury to a child, five *692 years of imprisonment followed by five years of special parole. The trial court ordered all of the sentences to run concurrently, resulting in a total effective sentence of ten years imprisonment followed by ten years of special parole." Id. On appeal, "[w]e conclude[d] that the defendant's sentence violate[d] [General Statutes] § 54-128(c) because the total length of the term of imprisonment and term of special parole combined exceed[ed] the maximum term of imprisonment authorized for sexual assault in the second degree."[4] Id., at 523, 902 A.2d 1058. We held that the defendant's sentence was illegal because his sentence of special parole potentially exposed him to an additional term of imprisonment after he had finished serving his ten year maximum term of imprisonment. Id., at 537-38, 902 A.2d 1058. Therefore, we concluded that the term of ten years imprisonment and ten years special parole exceeded the maximum statutory limit for the offense of sexual assault in the second degree. Id., at 544, 902 A.2d 1058. We also noted that the defendant's sentence for sexual assault in the third degree violated § 54-128(c). Id., at 545, 902 A.2d 1058. Accordingly, we remanded the case to the trial court for resentencing in accordance with State v. Raucci, 21 Conn.App. 557, 575 A.2d 234, cert. denied, 215 Conn. 817, 576 A.2d 546 (1990), and State v. Miranda, 260 Conn. 93, 127-30, 794 A.2d 506, cert. denied, 537 U.S. 902, 123 S.Ct. 224, 154 L.Ed.2d 175 (2002), wherein we had approved the standard upon remand of an illegal sentence, or successful appeal by a defendant in a multi count conviction and punishment. Tabone I, supra, at 544, 902 A.2d 1058. Those cases affirm that "[t]he guiding principle is that the court may resentence the defendant to achieve a rational coherent [sentence] in light of the remaining convictions"; (internal quotation marks omitted); as long as the revised total effective sentence does not exceed the original. State v. Raucci, supra, at 563, 575 A.2d 234.
On remand, the trial court sentenced the defendant to a total effective sentence of twenty years incarceration, execution suspended after ten years, followed by ten years probation for his conviction of sexual assault in the second degree, sexual assault in the third degree and risk of injury to a child. Tabone II, supra, 292 Conn. at 425-26, 973 A.2d 74. In Tabone II, the defendant again appealed from the judgment of the trial court, claiming, inter alia, that the total effective sentence after remand was illegal because the substitution of ten years probation for the ten years special parole unconstitutionally enlarged his sentence. Id., at 426-27, 973 A.2d 74. We reversed the judgment of the trial court and remanded the case for further proceedings. Id., at 442, 973 A.2d 74. We agreed with the defendant that, because the terms of incarceration following violations of probation and special parole are calculated differently, the defendant could be exposed to a significantly longer period of incarceration for a probation violation than for a violation of special parole, thereby exceeding the confines of his original sentence. Id., at 428-31, 973 A.2d 74.
The following additional facts and procedural history are relevant to the present appeal. In Tabone II, supra, 292 Conn. at *693 431, 973 A.2d 74, we stated: "[W]e once again remand the case for resentencing in accordance with the aggregate package theory under State v. Raucci, supra, 21 Conn.App. [at 557] 539 [575 A.2d 234], and State v. Miranda, supra, 260 Conn. [at] 93 [794 A.2d 506]." In our opinion, we suggested that, upon remand, "the defendant could be sentenced to a total effective sentence of ten years incarceration followed by nine years of special parole. . . ." Tabone II, supra, at 438, 973 A.2d 74. We left the ultimate sentencing decision, however, to the trial court. Id. Thereafter, on remand in the trial court, the defendant moved to withdraw his pleas. The trial court heard argument on the defendant's motion before denying it on the merits.[5] The trial court then resentenced the defendant in accordance with our suggested sentence.
We begin our analysis with the applicable standard of review and relevant legal principles. "Determining the scope of a remand is a matter of law because it requires the trial court to undertake a legal interpretation of the higher court's mandate in light of that court's analysis. . . . Because a mandate defines the trial court's authority to proceed with the case on remand, determining the scope of a remand is akin to determining subject matter jurisdiction. . . . We have long held that because [a] determination regarding a trial court's subject matter jurisdiction is a question of law, our review is plenary." (Citations omitted; internal quotation marks omitted.) Hurley v. Heart Physicians, P.C., 298 Conn. 371, 383, 3 A.3d 892 (2010); see also Matey v. Estate of Dember, 85 Conn.App. 198, 206, 856 A.2d 511 (2004) (following remand, trial court's jurisdiction and duties are limited to scope of remand order); 5 Am.Jur.2d 453, Appellate Review § 784 (1995) (lower court powerless to undertake any proceedings beyond those specified by higher court's opinion and mandate).
"The subject matter jurisdiction requirement may not be waived by any party, and also may be raised by a party, or by the court sua sponte, at any stage of the proceedings, including on appeal." Peters v. Dept. of Social Services, 273 Conn. 434, 441, 870 A.2d 448 (2005). We consider the question of subject matter jurisdiction in the present case because, once raised, that question must be answered before we can address the other issues raised. Rayhall v. Akim Co., 263 Conn. 328, 337, 819 A.2d 803 (2003).
"Well established principles govern further proceedings after a remand by this court. In carrying out a mandate of this court, the trial court is limited to the specific direction of the mandate as interpreted in light of the opinion. . . . This is the guiding principle that the trial court must observe. . . . The trial court should examine the mandate and the opinion of the reviewing court and proceed in conformity with the views expressed therein. . . . West Haven Sound Development Corp. v. West Haven, 207 Conn. 308, 312, 541 A.2d 858 (1988); see Wendland v. Ridgefield Construction Services, Inc., 190 Conn. 791, 794-95, 462 A.2d 1043 (1983); State v. Avcollie, 188 Conn. 626, 643, 453 A.2d 418 (1982), cert. denied, 461 U.S. 928, 103 S.Ct. 2088, 77 L.Ed.2d 299 (1983); Nowell v. Nowell, 163 Conn. 116, 121, 302 A.2d 260 (1972)." (Internal quotation marks omitted.) Bauer v. Waste Management of Connecticut, Inc., 239 Conn. 515, 522, 686 A.2d 481 (1996). "These principles apply to criminal as well as to civil proceedings." State v. Lafferty, 191 Conn. 73, 76, *694 463 A.2d 238 (1983). "The trial court cannot adjudicate rights and duties not within the scope of the remand." (Internal quotation marks omitted.) State v. Avcollie, supra, at 643, 453 A.2d 418.
In Tabone II, supra, 292 Conn. at 442, 973 A.2d 74, this court remanded the case to the trial court solely for resentencing in accordance with the reasoning set forth in that decision. Therefore, the trial court's authority was limited to that task. State v. Avcollie, supra, 188 Conn. at 643, 453 A.2d 418. Accordingly, the trial court did not have subject matter jurisdiction over the defendant's motion to withdraw his pleas. Because the trial court lacked subject matter jurisdiction over the defendant's motion, it should have dismissed the motion rather than denied it. See In re Matthew F., 297 Conn. 673, 676, 701, 4 A.3d 248 (2010) (reversing, for lack of subject matter jurisdiction, grant of petitioner's motion that department of children and families pay for petitioner's private placement services and remanding to trial court with direction to dismiss); see also State v. Taylor, 91 Conn.App. 788, 795, 882 A.2d 682 (reversing, for lack of subject matter jurisdiction, denial of defendant's motion for correction of illegal sentence and remanding to trial court with direction to dismiss), cert. denied, 276 Conn. 928, 889 A.2d 819 (2005). When a trial court mistakenly denies a motion instead of dismissing it for lack of subject matter jurisdiction, the proper remedy is to reverse the order denying the motion and remand the case with direction to dismiss the motion. State v. Francis, 69 Conn.App. 378, 384-85, 793 A.2d 1224, cert. denied, 260 Conn. 935, 802 A.2d 88, cert. denied, 537 U.S. 1056, 123 S.Ct. 630, 154 L.Ed.2d 536 (2002). Accordingly, we conclude that the defendant's motion to withdraw his guilty pleas was beyond the scope of our remand for resentencing in Tabone II.
The judgment is reversed and the case is remanded with direction to dismiss the defendant's motion to withdraw his pleas.
In this opinion the other justices concurred.
NOTES
[1]  The defendant appealed from the judgment of the trial court to the Appellate Court, and upon the state's motion, we transferred the appeal to this court pursuant to General Statutes § 51-199(c) and Practice Book § 65-2.
[2]  On appeal to this court, the defendant claims that the imposed sentence of special parole is illegal because it violates both the ex post facto clause of the United States constitution and his due process right to fair warning. This claim is without merit. We have previously determined; Tabone II, supra, 292 Conn. at 437-38 n. 23, 973 A.2d 74; that the defendant's sentence imposed upon resentencing is consistent with the aggregate package theory, which authorizes a trial court to resentence a defendant on each of his convictions provided that the new sentence does not exceed the original illegal sentence. See State v. Miranda, 260 Conn. 93, 794 A.2d 506, cert. denied, 537 U.S. 902, 123 S.Ct. 224, 154 L.Ed.2d 175 (2002) (adopting aggregate package theory); see also State v. Raucci, 21 Conn. App. 557, 575 A.2d 234, cert. denied, 215 Conn. 817, 576 A.2d 546 (1990). Accordingly, the defendant's imposed sentence of special parole is lawful. Tabone II, supra, at 437-38 n. 23, 973 A.2d 74.
[3]  On appeal, the defendant additionally contends that the trial court abused its discretion in denying his motion to withdraw his pleas because he established the mandatory grounds for withdrawal as set forth in Practice Book § 39-27(3).
[4]  General Statutes (Rev. to 1999) § 53a-71 (b) provides in relevant part: "Sexual assault in the second degree is a class C felony. . . ."

General Statutes (Rev. to 1999) § 53a-35a provides in relevant part: "For any felony committed on or after July 1, 1981, the sentence of imprisonment shall be a definite sentence and the term shall be fixed by the court as follows . . . (6) for a class C felony, a term not less than one year nor more than ten years. . . ."
[5]  In denying the defendant's motion on its merits, the court implicitly assumed that it had subject matter jurisdiction over the motion.
