Assuming you are cooking with a Frenched rack of lamb, begin with marinating it. Mince rosemary and add it to finely minced garlic, olive oil, salt and pepper.
Place the rack in a zip lock bag or a glass container with a lid. Add marinade and coat it very well. Marinate for at least 4 hours but preferably overnight.
Sear and Bake
Take the marinated lamb out of refrigerator at least 1 hour- 1.5 hours and bring it close to room temperatur.
Warp aluminum foil around the exposed rib bones.
Pre-heat oven to 200°C/400°F.
Heat a cast iron skillet to medium-high heat. Shift the lamb to the skillet along with the remaining marinade drizzled on top. Sear each side for 1 minute including the edges. End of 1 minute, add 2 tablespoons of butter, whole crushed garlic and 1-2 sprigs rosemary.
Once the butter has melted, bast lamb by rapidly pouring the melted butter all over the lamb for about 1- 2 minutes (like you bast a steak).
Shift the seared lamb on a grill placed above a baking sheet, Spoon a tablespoon of butter from the skillet on to the lamb. Bake for 12 minutes.
To avoid guesswork, insert a meat thermometer and make sure the internal temperature is 57°C/135°F for a perfect medium-rare doneness.
Remove lamb from the oven and loosely cover it with a foil. Let it rest for 7-8 minutes. Then move to a chopping board.
Making gravy (optional)
Fish out garlic, rosemary, and any residual burnt bit from the skillet leaving behind the butter in the skillet. Add beef stock to the baking tray that has all the drippings. Scarp to deglaze the tray.
Heat butter and add a fresh sprig of rosemary and crushed whole garlic. Press garlic with the back of a spoon for it to brown.
Add beef stock to the skillet and let it simmer for a minute.
Slowly stir the cornstarch slurry and let the gravy thicken a bit. For a smooth gravy, run it under a sieve.
Serving
Carve the rack of lamb with a sharp knife and serve.